France's parliament has defied months of protests by approving a bill that would make France the 14th country legalising same-sex marriages.
In its second and final reading, the lower house of parliament, the National Assembly, voted 331 to 225 to adopt the bill allowing homosexual marriages and adoptions by gay couples.
Opponents to the law vowed to fight on and within hours, fiery clashes broke out in Paris between protesters and riot police.
Protesters gathered near the Invalides complex of museums and monuments threw glass bottles, cans and metal bars at police, who responded with tear gas.
Meanwhile, members of the gay and lesbian community flocked to a square in the capital to celebrate the vote.
Paris' openly gay mayor, Bertrand Delanoe, was among the crowd of hundreds gathered for the street celebration in the Marais, the city's historic gay neighbourhood.
Justice Minister Christiane Taubira immediately hailed the adoption of the bill as a "historic" moment in French history.
This law ... brightens the horizons of many of our citizens who were deprived of these rights.
"It grants new rights, stands firmly against discrimination [and] testifies to our country's respect for the institution of marriage," she said in a statement shortly after the vote.
"This law ... brightens the horizons of many of our citizens who were deprived of these rights," she said, adding that the first weddings could be as soon as June.
The bill must still be signed by President Francois Hollande. And shortly after the vote, legislators from right-wing parties said they had already filed a legal challenge with the constitutional council.
It will have a month to make a ruling and opponents are hoping that in the meantime they can build up enough pressure to force Hollande, who has been steadfast in supporting the bill, to back down from signing it.
Former president Jacques Chirac shelved an unpopular employment law that had been passed by parliament in 2006, but Hollande is seen as unlikely to follow that precedent.
The government is also confident that the constitutional challenge will be dismissed.
"We have ensured that there is no legal weakness," Dominique Bertinotti, family minister, said. "The constitutional council is sovereign but the government is serene. We're confident."
Hundreds of thousands have taken to the streets in a series of protests against the bill, surprising many in a country that is predominantly Catholic but known for its liberal views.
The opposition turned increasingly nasty as the final vote approached.
Some politicians received personal threats, a handful of demonstrations ended in violence amid claims of infiltration by extreme-right activists, and there was even a scuffle in parliament as the debate concluded in the small hours of Friday.
The Socialist speaker of the lower house, Claude Bartolone, on Monday received an envelope containing ammunition powder and a threatening letter demanding he delay Tuesday's vote.
The tensions have also been linked to a spike in hate crimes against the gay community that have included attacks on bars and two serious assaults in Paris, prompting the police to take preventive measures in case of a further backlash.
The opposition UMP has succeeded in making gay marriage a focus of broader discontent with the government over the parlous state of the economy and a recent scandal in which Hollande's ex-budget minister was charged with tax fraud after admitting to having an undeclared foreign bank account.