PARIS — With a definitive vote by the lower house of Parliament, France on Tuesday became the world’s 14th nation, and the third in just two weeks, to approve marriage rights for same-sex couples.

The legislation is expected to be approved by the Constitutional Council and signed into law by President François Hollande in time to allow the country’s first same-sex weddings this summer.

Passage of the “marriage for all” law, sponsored by Mr. Hollande, a Socialist, came after months of sometimes angry debate and a series of major protests, rallies that drew Roman Catholics from France’s rural regions and received the backing of Christian, Jewish and Muslim religious leaders, as well as the conservative political opposition. Homophobic violence had risen in recent weeks, with a handful of attacks on gay couples reported across the country.

Photo

Security personnel scuffled with same-sex marriage opponents as the lower house of Parliament voted to give gay couples the right to wed and to adopt.Credit
Ian Langsdon/European Pressphoto Agency

The legislation was approved by a vote of 331 to 225 in the National Assembly, the lower house, where the left holds a strong majority. Eleven legislators from the center and right broke with party lines to support the law, though there were indications that some of those votes may have been cast by mistake. There were 10 abstentions.

Opposition to the law, which also opens adoption to same-sex couples, remained strong and vocal even after the vote. Members of Parliament from the country’s main opposition party, the center-right Union for a Popular Movement, had earlier announced that they would challenge the legality of the new law before the Constitutional Council, a high court that rules on matters of constitutionality. And organizers for an opposition movement called La Manif Pour Tous, or Protest for All, said they intended to continue to demonstrate.

Photo

Justice Minister Christiane Taubira, center bottom, was applauded in the French National Assembly as she answered questions about the law, which was sponsored by President François Hollande.Credit
Charles Platiau/Reuters

On Tuesday night, hundreds of demonstrators converged on the National Assembly, where opponents have held daily protests. Several dozen violent protesters, some wearing balaclavas, clashed with the riot police there, French news media reported, but most remained peaceful.

Hundreds of thousands of demonstrators have marched across France to protest the law, with much of their attention focused on adoption by gay couples; opponents have deplored what they call a threat to the foundations of French society and an injustice for children who will be raised by parents of the same sex. The tagline for La Manif Pour Tous reads, “All born from a man and a woman.”

“This democratically approved law is unjust and, by not respecting the rights of the most vulnerable citizens, it harms democracy,” said Tugdual Derville, a spokesman for La Manif Pour Tous. Mr. Derville vowed to continue opposing the law — but also homophobia — with “peaceful firmness.”

Backers of the legislation said it rectified an unjust and discriminatory status quo without impinging upon the rights of heterosexuals.

“It’s rare that equality and love win out in such a clear manner,” said Guillaume Bonnet, a French spokesman for All Out, an international gay rights group. Watching the vote on television on Tuesday, “I felt that my children, my grandchildren were going to remember this,” said Mr. Bonnet, who is gay.

While rapid enactment seems almost certain, there is precedent for the Constitutional Council to reject a legal text prepared by Mr. Hollande’s government. In December, the court rejected legislation that would have created a 75 percent marginal tax rate on incomes of more than one million euros, or about $1.3 million; that legal text failed to account for the fact that French income tax is levied on households, not individuals.

Mr. Hollande’s junior minister for the family, Dominique Bertinotti, said Tuesday that the government had been careful to avoid any “legal fragility” in the text of the marriage bill. In a 2011 decision, the court found that it was not its role to rule on the legal boundaries of marriage.

Some conservative lawmakers have suggested overturning the law should they find themselves with a parliamentary majority, but it remains unlikely that they will try to do so, despite their recent vocal opposition. Opinion polling has consistently shown that a strong majority of French support marriage rights for same-sex couples, though the country remains more evenly split on the matter of adoption.

A version of this article appears in print on April 24, 2013, on Page A4 of the New York edition with the headline: Amid Much Tumult, France Approves ‘Marriage for All’. Order Reprints|Today's Paper|Subscribe