Britain has legalized gay marriage after Queen Elizabeth II gave her royal stamp of approval.

House of Commons Speaker John Bercow told lawmakers on Wednesday that gay marriage had become enshrined in law— the day after the bill to legalize same-sex marriage in England and Wales cleared Parliament.

The Queen's approval of the Marriage (same sex couples) Bill was a formality, and now clears the way for the first gay marriages, the first of which are expected to be conducted by Summer 2014.

Download the new Independent Premium app Sharing the full story, not just the headlines

The bill enables gay couples to get married in both civil and religious ceremonies in England and Wales. It also will allow couples who had previously entered into a civil partnership to convert their relationship to a marriage.

However, religious organisations will have to 'opt in' on performing gay marriages.

The British government introduced the bill in January and proposals were finally approved by MPs and peers on Tuesday.

Prime Minister David Cameron had backed it, but it divided his Conservative Party and touched off strident debates in the House of Commons and House of Lords.

Additional reporting by PA