The French Senate voted Friday to legalize same-sex marriage in France, putting a landmark bill on track to become law by summer.

The vote in the upper house of Parliament — led by President Francois Hollande’s Socialists — comes despite boisterous protests against the legislation. Opponents, mostly conservatives and fervent Catholics, have sought to defend traditional marriage.

France’s justice minister, one of the bill’s most vocal supporters, said the proposed law recognizes that many children are already living with same-sex parents and deserve the same protections afforded children of opposite-sex parents.

“These are children that scrape their knees, eat too much candy, don’t like broccoli, drive you crazy. . . . We protect them,” Christine Taubira told senators after the vote.

The justice minister said that the change would “move our institutions toward ever more freedom, equality and personal respect.”

Both houses of Parliament will take up a second reading to consider minor Senate amendments to the bill passed in February by the National Assembly, which is also controlled by a Socialist-led majority.

Some conservative senators vowed to maintain their opposition to the bill.

“The parliamentary process continues, so we will keep talking with the French people who seem to change their position,” said Sen. Jean-Pierre Raffarin of the center-right Union for a Popular Movement party. “Nothing is definitive, and the debate continues.”

Polls have shown that a narrow majority of French citizens support legalizing same-sex marriage, although that support falls when questions about adoption and conception of children come into play.

The bill would also allow same-sex couples to adopt children. On the campaign trail last year, Hollande pledged to push through such legislation if elected.

About a dozen nations, most of them European, already allow same-sex marriage. This week, Uruguay became the third country in the Americas after Canada and Argentina to authorize it.

Opponents and supporters of France’s bill have staged loud demonstrations as the legislation moved through Parliament. In mid-January, at least 340,000 people swarmed the Eiffel Tower to protest the plan to legalize same-sex 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.