PARIS—France legalized same-sex marriage on Tuesday after a wrenching national debate that exposed deep conservatism in the nation’s heartland and triggered huge demonstrations. Within hours, fiery clashes broke out between protesters and riot police.

A protest against the measure turned violent late Tuesday near the Invalides complex of museums and monuments. Protesters threw glass bottles, cans and metal bars at police, who responded with tear gas.

PHOTOS: Same-sex marriage celebrations and protests in France

It was an issue that galvanized the country’s faltering right, which had been decimated by infighting and their election loss to President François Hollande. France is the 14th country to legalize gay marriage nationwide.

The measure passed easily in the Socialist-majority Assembly, 331-225, just after the president of the legislative body expelled a disruptive protester in pink, the colour adopted by French opponents of gay marriage.

Justice Minister Christiane Taubira told lawmakers that the first weddings could be as soon as June.

“We believe that the first weddings will be beautiful and that they’ll bring a breeze of joy, and that those who are opposed to them today will surely be confounded when they are overcome with the happiness of the newlyweds and the families,” she said.

In recent weeks, violent attacks against gay couples have spiked and some legislators have received threats — including Claude Bartelone, the Assembly president, who got a gunpowder-filled envelope on Monday.

Following the vote members of the gay and lesbian community flocked to a square in central Paris to celebrate. Paris’ openly gay mayor, Bertrand Delanoe, was among the crowd of hundreds gathered for the street celebration in the Marais, the city’s historic gay neighbourhood.

“I feel immense joy, gigantic joy,” said 39-year old Sylvain Rouzel. “At last, everyone has the same rights.”

Claire Baron, 41, a mother of two, said that she “will oppose the bill until the end.”

“We are here to defend family values. Children need a mom and a dad,” she said.

When Hollande promised to legalize gay marriage, it was seen as relatively uncontroversial. The issue has become a touchstone as his popularity has sunk to unprecedented lows, largely over France’s ailing economy.

Loading... Loading... Loading... Loading... Loading... Loading...

“The opposition is in a weakened position, but they know which buttons to press in order to get a reaction in society, in a country as liberal as France, where nobody thought it was an issue,” said Hossein Alizadeh, a co-ordinator with the U.S.-based International Gay and Lesbian Human Rights Commission.

Hoping to keep the issue alive, the conservative UMP party planned to challenge the law in the constitutional Council.

French civil unions, allowed since 1999, are at least as popular among heterosexuals as among gay and lesbian couples. But that law has no provisions for adoption, and the strongest opposition to same-sex couples in France comes when children are involved. According to recent polls, just over half of French are opposed to adoption by same-sex couples — about the same number who said they favoured same-sex marriage.

Read more about: