France's lower house of parliament on Tuesday approved a sweeping bill 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 show most French support legalizing gay marriage, though that backing softens 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 bill now goes to the Senate, which is also controlled by the Socialists and their allies.

With the 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 six states in the United States.

The issue exposed fault lines between a progressive-minded leftist legislative majority in France, and its conservative roots. Critics -- among them many Roman Catholics -- railed that the bill would erode the family. The Socialists, however, sought to depict the issue as one of equal rights, and 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 the 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 tally, 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."

The government didn't get all it wanted: Hollande's Socialists backed off plans to link the 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.