France's highest constitutional authority - the Conseil Constitutionnel - on Friday ruled that mayors in France will not be allowed to refuse to marry gay couples.
The court rejected an appeal based on religious or moral objections to the practice of gay marriage, which was signed into law in France in May.
The first gay wedding took place on May 29th in the city of Montpellier.
French town mayors are officers of the civil state in France, which means one of their functions is officiating at weddings. A law passed in June provided legal sanctions for any such officer who refused to conduct marriages on the basis of a couple's orientation.
"This legislation did not violate their freedom of conscience, and the disputed sections do conform with the Constitution," the court said in a statement on Friday.
The ruling will be seen as a further blow to France's anti-gay marriage movement, which has become weakened and fragmented since gay marriage was signed into law.
A number of mayors of towns across France caused controversy over the summer by publicly refusing to officiate at the wedding ceremonies of gay couples.
When Jean-Michel Colo, mayor of Arcangues in the Pays-Basques region of south-western France, refused to marry two gay men in June, Interior Minister Manuel Valls warned him of the consequences of his actions.
Valls declared that there would be "significant sanctions" if Colo pressed ahead on the matter, telling the media that any public servants refusing to respect the letter of the law would be guilty of discrimination and thus risk up to three years in prison, as well as paying €45,000 in damages.
The same month, Claude Binaud, six-time mayor of Matha, a town in the Charente-Maritime region of south-western France, caused a stir by refusing to marry a local man, Bernard Rouhaud, and his partner, but qualified his refusal by saying he "might marry two girls."
“There’s no doubt, I will not marry them, not two boys,” he told regional daily Sud-Ouest at the time.
“I don’t find it [gay marriage] normal. We’re touching on something central to society here – the family,” he said.
“Two girls, I might have said yes, if my back was against the wall. But that’s totally different, they can have children,” he added.