French President Francois Hollande has signed a bill legalising gay marriage in France, after a right-wing challenge to the law was rejected by the country's Constitutional Council.
Hundreds of protesters took to the streets of Paris to protest against the legislation, which also allows same-sex couples to adopt, and has generated enormous controversy.
Hollande said: "I have taken [the decision]; now it is time to respect the law of the Republic.
"I will ensure that the law applies across the whole territory, in full, and I will not accept any disruption of these marriages."
Legalising gay marriage was one of the key pledges of Hollande's Socialist Party ahead of their election last year.
After fierce debate, both the country's Senate and National Assembly passed the bill, which was then challenged in April by the UMP party of former president Nicolas Sarkozy, backed by the Catholic Church.
Critics claimed that the bill undermined the traditional family and failed to respect the rights of children to a mother and a father.
However, in their ruling, the Constitutional Council said that "same-sex marriage did not run contrary to any constitutional principles", and that it did not infringe on "basic rights or liberties or national sovereignty".
It said that the welfare of the child would remain paramount in adoption cases, and that the legislation did not mean that gay people would automatically have the "right to a child".
The first gay marriage in France could be held in 10 days' time.
UMP President Jean-Francois Cope said he regretted the Constitutional Council's decision but respected it. However another senior UMP figure, Herve Maton, said that the party would come up with measures that were "more respectful of the rights of children" by 2017.
The bill has provoked huge and occasionally violent protests. One demonstration in Paris drew 340,000 people, according to official police figures. Last night an officer was taken to hospital when a protester threw an inflammable liquid in his face.
Despite polls showing solid public backing for the legislation last year, half the public do not now support gay adoption, after the right mobilised opposition.
"Now it's celebration time," said spokesman Nicolas Gougain of the Inter-LGBT association, which represents the lesbian, gay, bisexual and transgender communities.
But gay rights watchdog SOS Homophobie added: "Our country has taken a great step forward today although it's regrettable that it was taken in a climate of bad faith and homophobic violence."
France is the world's 14th country and the ninth in Europe to legalise gay marriage.
The strength of opposition to the legislation in France took many observers by surprise, as polls show the Catholic Church to be a declining force.