Vincent Autin and Bruno Boileau have become the first gay couple to marry in France, days after a bill allowing same-sex marriage was signed into law.
The high-profile ceremony in the southern city of Montpellier, held amid tight security, was broadcast live on French television.
Extra police were drafted in amid fears the extreme-right might also attend, the BBC reports.
The Socialist mayor of Montpellier, Helene Mandroux, conducted the ceremony, announcing "I now pronounce you united in marriage."
Her announcement was met with applause from the guests, as Frank Sinatra's Love and Marriage was played.
Supporters of same-sex marriage had gathered outside the town hall where the marriage took place, as had some opponents who let off several flares.
Mr Autin, a 40-year-old gay rights activist, made a short speech after the ceremony thanking supporters. He frequently broke down in tears, reports AFP. "Love yourselves, let's love ourselves, because it's important," he said.
The new legislation allowing same-sex marriage and adoption has divided France and sparked violent protests.
The bill was finally signed into law on 18 May, but opponents have vowed to fight on and on Sunday, at least 150,000 demonstrators took to the streets of Paris to denounce the law.
Opinion polls have suggested that about 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.