France's president has signed into law a controversial bill making the country the ninth in Europe, and 14th globally, to legalise gay marriage.
On Friday, the Constitutional Council rejected a challenge by the right-wing opposition, clearing the way for Francois Hollande to sign the bill.
He said: "I have taken [the decision]; now it is time to respect the law of the Republic."
The first gay wedding could be held 10 days after the bill's signing.
But Parliamentary Relations Minister Alain Vidalies told French TV he expected the first ceremonies to take place "before 1 July".
Mr Hollande and his ruling Socialist Party have made the legislation their flagship social reform since being elected a year ago.
After a tortured debate, the same-sex marriage and adoption bill was adopted by France's Senate and National Assembly last month.
The bill was quickly challenged on constitutional grounds by the main right-wing opposition UMP party of former president Nicolas Sarkozy.
But the Constitutional Council ruled on Friday 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 the interest of the child would be paramount in adoption cases, cautioning that legalising same-sex adoption would not automatically mean the "right to a child".
Comedian Frigide Barjot, who has become a leading mouthpiece for the anti-gay marriage movement, denounced the ruling as "a provocation" and called for the campaign to continue.
Scores of protesters took to the streets of Paris to voice their opposition to the ruling on Friday: previous, occasionally violent, demonstrations against the bill have drawn hundreds of thousands onto the streets.
UMP President Jean-Francois Cope said he regretted the Constitutional Council's decision but would respect it. Another senior UMP figure, Herve Mariton, said the party would come up with alternative proposals in 2017 that were "more respectful of the rights of children".
The anti-gay marriage lobby, backed by the Catholic Church and conservative opposition, argues the bill will undermine an essential building block of society.
Opinion polls have suggested that around 55-60% of French people support gay marriage, but only about 50% approve of gay adoption.
France is now the 14th country to legalise gay marriage after New Zealand last month.
It is also the ninth country in Europe to allow same-sex marriage after legalisation in the traditionally liberal Netherlands and Scandinavia, but also in strongly Catholic Portugal and Spain. Legislation is also moving through the UK Parliament.
But the measure has aroused stronger than expected opposition in France - a country where the Catholic Church was thought to have lost much of its influence over the public.
In January, a protest in Paris against the bill attracted some 340,000 people according to police - one of the biggest public demonstrations in France in decades. Organisers put the figure at 800,000.
Since then, both sides have held regular street protests.
Mr Hollande has been struggling with the lowest popularity ratings of any recent French president, with his promises of economic growth so far failing to bear fruit and unemployment now above 10%.