France's first gay marriage, which was conducted last month by a local mayor, has been annulled by a court.
The issue has ignited a fierce debate in France
The tribunal in Bordeaux declared the marriage of Stephane Chapin and Bertrand Charpentier "null and void".
The mayor, Noel Mamere of the Green Party, was suspended for a month after defying government warnings that he would be breaking the law when he wed the two men in the town of Begles.
Justice Minister Dominique Perben had already declared the wedding invalid.
The prosecutor in the case said that the marriage was not in compliance with French law.
The couple's lawyers argued that no article in the French civil code forbade the marriage of two persons of the same sex and no text defined marriage as "the union of a man and a woman".
Shopkeeper Bertrand Charpentier, 31, and nurse Stephane Chapin, 33, have said through their lawyers that they would appeal against this ruling, AFP news agency reports.
"We will fight all the way as we announced almost two months ago," Mr Charpentier.
Mr Chapin said: "We were expecting it. In any case, we are still married, we will see later [what happens]."
Mr Mamere, who presided over the wedding in Begles on 5 June, also vowed before the ruling to take the case to the European Court of Human Rights if necessary.
The union generated intense controversy in France
A civil contract called the Pacs already gives some rights to cohabiting couples, regardless of their sex, but not the full rights of marriage, notably over taxes, inheritance and adoption.