France's lower house of parliament approved a sweeping bill on Tuesday to legalize gay marriage and allow same-sex couples to adopt children, handing a major legislative victory to President Francois Hollande's Socialists on a divisive social issue.

The measure, approved in the National Assembly in a 329-to-229 vote, puts France on track to join about a dozen mostly European nations that allow gay marriage and comes despite a string of recent demonstrations by opponents of the so-called "marriage for all" bill.

Polls indicate a narrow majority of French support legalizing gay marriage, though that support falls when questions about the adoption and conception of children come into play.

The Assembly has been debating the bill, and voting on its individual articles in recent weeks. The overall legislation now goes in the coming weeks to the Senate, which also is controlled by the governing Socialists and their allies.

With Tuesday's vote, France joins Britain in taking a major legislative step in recent weeks toward allowing gay marriage and adoption — making them the largest European countries to do so. The Netherlands, Belgium, Norway and Spain, as well as Argentina, Canada and South Africa have authorized gay marriage, along with nine U.S. states and the District of Columbia.

The issue has exposed fault lines between a progressive-minded leftist legislative majority in officially secular France, and the country's conservative religious roots. Critics — including many Roman Catholics — have railed that the bill would erode the traditional family. Socialists, however, sought to depict the issue as one of equal rights, and they played off France's famed Revolution-era motto of "Liberty, Equality and Fraternity."

"This law is going to extend to all families the protections guaranteed by the institution of marriage," Prime Minister Jean-Marc Ayrault said before Tuesday's vote. "Contrary to what those who vociferate against it say — fortunately they're in the minority — this law is going to strengthen the institution of marriage."

As with many major and controversial reforms in France, the issue drew its share of political grandstanding over weeks of debate. Conservative opponents forced a discussion of nearly 5,000 amendments, a move derided by Socialists as inconsequential stalling tactics. But by the final vote, the government rank-and-file rolled out grand, solemn statements of victory.

"This law is a first necessary step, a social evolution that benefits society overall," said Socialist representative Corinne Narassiguin, announcing her party's support for the measure. "Opening up marriage and adoption to homosexual couples is a very beautiful advance. ... It is an emblematic vote, a vote that will mark history."

However, the political right hasn't given up just yet, saying the constitutional Court — whose 12 members include three former French presidents and several other prominent conservatives — will determine whether the law, if finally passed, meshes with the law of the land.

"So it's not the end of the story yet," said Herve Mariton, a member of the main opposition UMP party. "We still have arguments to make and we want to convince people that it is not a good project."

The government didn't get all it wanted. The Socialists last month backed off plans to link the gay marriage measure to relaxed restrictions on fertility treatments, after catching political heat for its stance on assisted reproduction. The issue is expected to come up in a separate bill later this year.

Hollande made legalizing gay marriage one of the planks in his 60-point program on the way to winning the presidency in May over conservative incumbent Nicolas Sarkozy. But Hollande's popularity has fallen along with France's lacklustre economic performance, and his foes on the right appear to sense he might be vulnerable on a high-profile social issue.

The latest polls suggest a narrow majority of French support gay marriage, but that has declined from about two-thirds support in August. In mid-January, at least 340,000 people swarmed on the Eiffel Tower to protest the plan to legalize gay marriage, according to police estimates. Two weeks later, about 125,000 proponents of the bill marched in the capital.

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 or assisted reproduction.