French lawmakers have legalized same-sex marriage after months of bruising debate and street protests that brought hundreds of thousands to Paris.

Tuesday’s 331-225 vote came in the Socialist majority National Assembly. France’s justice minister, Christiane Taubira, said the first weddings could be as soon as June.

Opponents of the law say France is not ready to legalize adoption for same-sex couples, and polls show a France sharply divided on the issue.

Thousands of police mobilized ahead of the vote, preparing for dueling protests around the National Assembly building and along the Seine River. At least one spectator was ejected from the gallery.

France is the 14th country to legalize gay marriage, and Tuesday’s vote comes a week after New Zealand — with very little controversy — allowed same-sex couples to wed.