Britain on Wednesday legalized gay marriage after Queen Elizabeth II gave her royal stamp of approval, clearing the way for the first same-sex weddings next summer.

Lawmakers cheered as House of Commons Speaker John Bercow said royal assent had been given — one day after the bill to legalize same-sex marriage in England and Wales cleared Parliament.

The queen’s approval was a formality and is the last step necessary for a bill to become law.