France's top court ruled Friday that mayors cannot refuse to conduct same-sex marriages on the ground it goes against their religious or moral beliefs.

The Constitutional Council's ruling followed an appeal by mayors and registrars opposed to pathbreaking legislation legalising gay marriage on May 18.

A five-page judgement said their contention was not valid as the "freedom of conscience" clause they evoked as a constitutional right was not present in the legislation.

The recalcitrant mayors, who claim the backing of some 20,000 elected officials, had claimed the lack of such a clause in the bill goes against the French constitution.

The mayors have said they will take the case to the European Court of Human Rights if they are snubbed in France.