France became the 14th country to allow same-sex marriage on Tuesday after parliament approved a new law championed by President Francois Hollande, but it came at a political price amid violent street protests and a rise in homophobic attacks.
Hollande's "marriage for all" law is one of the biggest social reforms in France since his left-wing mentor and predecessor Francois Mitterrand abolished the death penalty in 1981, a move which also split opinion.
Lawmakers in the lower house National Assembly, where Hollande's Socialists have an absolute majority, passed the bill by 331 votes for and 225 against.
"Many French people will be proud this job is done," Justice Minister Christiane Taubira told parliament. "Those protesting today will find themselves moved by the joy of the newly-weds."
Yet the episode has proved costly for an already unpopular president. Critics said Hollande should focus instead on fixing the moribund economy while opponents of the law have demanded a referendum and protests against it descended into violence.
Opposition conservatives and centrists immediately appealed to the Constitutional Council, the country's top court, to have it struck down.
The ruling body will now debate whether the law is constitutional. Hollande wants the bill to come into effect by May 25, with the first gay marriages anticipated in June.
The debate has been blamed for a spate of homophobic attacks, including the beating of a 24-year-old in the southern city of Nice on Saturday. Interior Minister Manuel Valls warned this week of "zero tolerance" for such violence.
Socialist and conservative lawmakers had come close to blows more than once during lengthy parliamentary debates on the law, which authorizes adoption and marriage but will not allow gay couples to use medically assisted procreation.
Opponents of the law attempted to unveil a banner in parliament calling for a referendum before being taken away by security.
"You are adding a crisis to a crisis. You are stirring up tensions and are lighting the fuse of homophobia," Herve Mariton, a member of the opposition UMP party, told lawmakers ahead of the vote.
France, a mainly Catholic country, follows 13 others including Canada, Denmark, Sweden and most recently Uruguay and New Zealand in allowing gay and lesbian couples to tie the knot.
In the United States, Washington D.C. and nine states have legalized same-sex marriage.
Unlike Mitterrand's abolition of the death penalty, which most French people opposed at the time, polls showed more than half the country backed Hollande's gay marriage law.
The gay community greeted the news with fanfare, with some rights groups dubbing April 23 the "Day of Love". But opponents gathered outside parliament for fresh demonstrations.
The leader of the "anti" movement, a feisty female comedian who goes by her stage name Frigide Barjot, has vowed to continue protests that have brought thousands on to the streets beginning on May 5, the first anniversary of Hollande coming to power.