French President Francois Hollande has signed a gay marriage and adoption bill into law, a day after the country's Constitutional Council threw out a legal challenge by the conservative opposition.
Hollande, trying to turn the page on months of bitter opposition to the measures, said it was "time to respect the law and the Republic".
The Constitutional Council approved the bill on Friday, which was also the International Day Against Homophobia.
The ruling cleared the way for France to become the 14th country to legalise same-sex marriage.
French deputies approved the bill in parliament last month after a several days of often stormy debate.
Recent polls suggest that opinion in France is fairly evenly split on both gay marriage and adoption.
The main opposition UMP party of former President Nicolas Sarkozy immediately challenged the move on constitutional grounds.
Friday's statement by the Constitutional Council, however, said 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".
The council did say that gay marriage did not automatically mean the "right to a child": the "interest of the child" would be the overriding factor in such cases, it ruled.
Reacting to the ruling Friday, Jean-Francois Cope, UMP party chief, told TF1 television: "It is a decision that I regret, but that I respect."
Hollande had given warning that he would brook no resistance.
"I will ensure that the law applies across the whole territory, in full, and I will not accept any disruption of these marriages," he said.
Gay rights groups hailed the decision as a watershed.
"Now it's celebration time," said Nicolas Gougain, spokesman of the LGBT association representing the lesbian, gay, bisexual and transgender communities.
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."
The issue of gay marriage has divided France, which is officially secular but overwhelmingly Catholic. Protests against the bill drew hundreds of thousands, with a handful of hard-core protesters clashing with police.
Late on Friday, between 200 and 300 protesters gathered in central Paris to denounce the ruling backing the bill and calling on Hollande to resign.
One police officer was injured after a flammable liquid was thrown in his face.
Earlier, a group of bare-chested men wearing white masks staged their own protest against gay marriage on one of the bridges over the Seine. They call themselves the "Hommen" - a riposte to the bare-breasted feminist protesters known as the "Femmen".
Opponents of the law plan another major protest rally in Paris on May 26.
As the French bill got the green light to become law, a report by the European Union's Agency for Fundamental Rights (FRA) highlighted the problems that gay, lesbian, bisexual and transgender people still face across Europe.
It said two-thirds of the community were still afraid to show their sexuality in public - and a quarter had been victims of physical or verbal attacks.