LONDON — The French like to make fun of the British, joking about their repressed ways in matters of the heart. But when it came time to debate same-sex marriage, it was France that betrayed a deep conservative streak in sometimes violent protests — while the British showed themselves to be modern and tolerant.

With little fanfare or controversy, Britain announced Wednesday that Queen Elizabeth II — hardly a social radical — had signed into law a bill legalizing same-sex marriages in England and Wales. France has also legalized gay marriages, but only after a series of gigantic protests attracting families from the traditional heartland that revealed a deeply split society.

Official word that the queen had approved the bill drew cheers in the usually sedate House of Commons.

“This is a historic moment that will resonate in many people’s lives,” Equalities Minister Maria Miller said in a statement. “I am proud that we have made it happen and I look forward to the first same sex wedding by next summer.”

There were British political figures and religious leaders vehemently opposed to gay marriage but the opposition never reached a fever pitch, in part because the same-sex marriage bill had broad public support and the backing of the leaders of the three major political parties. In fact, it was Prime Minister David Cameron, leader of the tradition-minded Conservatives, who proposed the legislation in the first place.

The picture was completely different in France. Few people had expected legalizing gay marriage to face much of a hurdle. French polls had shown for more than a decade that the concept enjoyed majority public support, and Paris has had a gay mayor for years.