Legions of officers stayed late into the night, and a protest against the measure turned violent near the Invalides complex of museums and monuments. Protesters threw glass bottles, cans and metal bars at police, who responded with tear gas.
It was an issue that galvanized the country's faltering right, which had been decimated by infighting and their election loss to President Francois Hollande. France is the 14th country to legalize gay marriage nationwide --and the most populous.
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 color 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.
Earlier in the day, there appeared to be more police than protesters outside the Parliament building on Paris' Left Bank, but that calculation soon shifted as night fell and thousands gathered to protest the bill. The protest dwindled to a few stalwarts shortly before midnight, when the violence began among a few hundred demonstrators including some who carried signs saying "Socialist dictatorship."
Claire Baron, 41, a mother of two, said that she "will oppose the bill until the end."
"I'll keep going to the protests, I don't give in. The bill is not effective yet, the president of the Republic must listen to our voices. We are here to defend family values. Children need a mom and a dad," Baron 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.
One of the biggest protests against same-sex marriage drew together hundreds of thousands of people bused in from the French provinces -- conservative activists, schoolchildren with their parents, retirees, priests and others. That demonstration ended in blasts of tear gas, as right-wing rabble-rousers, some in masks and hoods, led the charge against police, damaging cars along the Champs-Elysees avenue and making a break for the presidential palace.
Following the vote members of the gay and lesbian community flocked to a square in central Paris, just behind City Hall, to celebrate the vote.
"I feel immense joy, gigantic joy," said 39-year old Sylvain Rouzel. "At last, everyone has the same rights. This is huge! France was lagging behind. We had to wait 14 years after the civil union to finally obtain the right to get married, with equal rights for everyone. I feel great!"
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 neighborhood.
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.
"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 coordinator with the U.S.-based International Gay and Lesbian Human Rights Commission who has followed the issue.
But the most visible face in the fight against gay marriage -- a former comedienne who goes by the name of Frigide Barjot -- said the movement named "A Protest for Everyone" will continue beyond the law's passage and possibly field candidates in 2014 municipal elections. She said anyone involved in protest violence would be marginalized, but blamed the government for its failure to listen.
"The violence comes from the way in which this was imposed," Barjot told France Info radio.
French conservatives, demoralized and divided by the election loss of standard-bearer Nicolas Sarkozy, found common cause in opposing same-sex marriage. Hoping to keep the issue alive, the conservative UMP party planned to challenge the law in the Constitutional Council.
"The controversy that we've seen has been a stoked and manipulated controversy that's really kind of a last-ditch attempt to block the tide of history," said Evan Wolfson, president of the American activist group Freedom to Marry, which he said worked with the French on the bill. "I don't think it spoke to a deep or wide opposition among the French people."
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 in France as far as same-sex couples goes 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 favored same-sex marriage.
Christophe Crepin, spokesman for the police union UNSA, says the extraordinary security Tuesday included a total of about 4,000 officers in the area near the National Assembly building and water cannon positioned nearby.
On the cover of Tuesday's Liberation newspaper, the famed gay photographers Pierre and Gilles took over the front page and several of the inside pages, splashing them with some of their most provocative photos, including one of three soccer players -- nude but for the footwear -- facing the camera.
In New Zealand, where gay marriage enjoys popular support, people gathered outside Parliament and joined in singing a traditional Maori love ballad after a vote last week making it legal. Nine states and the District of Columbia in the U.S. also recognize such marriages, but the federal government does not.
Take ABC13 with you!
Download our free apps for iPhone, iPad, Android and Blackberry devices