The first same-sex marriages have taken place in England and Wales after gay marriage became legal there at midnight.

British Prime Minister David Cameron hailed the marriages as sending a "powerful message" about equality in Britain.

He said the reform was necessary because "when people's love is divided by law, it is that law that needs to change".

Writing in Pink News, he said: "This weekend is an important moment for our country ... we will at last have equal marriage in our country."

Mr Cameron has faced opposition from some in the Conservative Party about his backing for the change.

He said: "Any marriage takes work, requires patience and understanding, give and take, but what it gives back in terms of love, support, stability and happiness is immeasurable.

"That is not something that the state should ever deny someone on the basis of their sexuality.

"The introduction of same-sex civil marriage says something about the sort of country we are.

"It says we are a country that will continue to honour its proud traditions of respect, tolerance and equal worth.

"It also sends a powerful message to young people growing up who are uncertain about their sexuality.

"It clearly says 'you are equal' whether straight or gay."

Among the first couples to take advantage of the legalisation were Peter McGraith and David Cabreza.

Ahead of their ceremony at Islington Town Hall, Mr McGraith said: "It is a mark of significant social progress in the UK that the legal distinction between gay and straight relationships has been removed.

"Very few countries afford their gay and lesbian citizens equal marriage rights.

"We believe that this change in law will bring hope and strength to gay men and lesbians in Nigeria, Uganda, Russia, India and elsewhere, who lack basic equality and are being criminalised for their sexual orientation."

The Marriage (Same Sex Couples) Act came into force in July last year.

However, it was not until 13 March this year that couples were able to register their intention to marry under the act for the first time.

On the same day, the law in England and Wales changed to recognise same-sex marriages previously performed overseas.

Scotland has also legislated to allow same-sex marriages, with the first ceremonies expected to take place later this year.

Northern Ireland has no plans to follow suit.