Media playback is unsupported on your device Media caption Peter McGraith and David Cabreza, John Coffey and Bernardo Marti, and Andrew Wale and Neil Allard were among the first gay couples to marry

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

Politicians from the main parties have hailed the change in the law.

David Cameron said the move sent a message that people were now equal "whether gay or straight", but some religious groups remain opposed.

Scotland passed a similar law in February; the first same-sex marriages are expected there in October. Northern Ireland has no plans to follow suit.

In an article for the Pink News website, the prime minister wrote: "This weekend is an important moment for our country.

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

The law change would encourage young people unsure of their sexuality, he added.

Image copyright Getty Images Image caption Teresa Millward and Helen Brearley married in Halifax

Image copyright AP Image caption Sean Adl-Tabatabai and Sinclair Treadway married in the council chamber at Camden Town Hall in London

Image copyright PA Image caption Sandi Toksvig and her partner Debbie renewed their civil partnership vows at an event in London celebrating the law change

Later on Saturday morning, Mr Cameron tweeted: "Congratulations to the gay couples who have already been married - and my best wishes to those about to be on this historic day."

Liberal Democrat leader Nick Clegg said "Britain will be a different place" as a result.

Image copyright PA Every wedding has a photographer but this one had hundreds. Outside Islington Town Hall, well-wishers stopped in the street to point their smartphones while TV crews fought for the best views. As the loving couple appeared on the steps, crowds cheered and even sang the tune to Here Comes The Bride - ironic perhaps, since this was a gay wedding with two grooms. Peter McGraith and David Cabreza are one of the first same-sex couples to marry in England and Wales. The law, passed in Parliament last year, came into effect today. And for some who have campaigned for years, the waiting was over. As the clock ticked past midnight, registrars started speaking, rings were exchanged and the confetti flew. Not everyone is taken by the idea though. Some politicians and religious leaders still oppose the change. And in Islington, as the two grooms beamed giant smiles, they reminded their guests that the battle for equality is still ongoing.

He congratulated his party for being part of the reform, saying: "If our change to the law means a single young man or young woman who wants to come out, but who is scared of what the world will say, now feels safer, stronger, taller - well, for me, getting into coalition government will have been worth it just for that."

Labour leader Ed Miliband congratulated those planning to tie the knot.

"This is an incredibly happy time for so many gay couples and lesbian couples who will be getting married, but it's an incredibly proud time for our country as well, recognising equal marriage in law," he said.

However, he warned that the "battle for true equality" was not yet won.

'Making history'

Several couples were ready to tie the knot the moment the law changed.

Human rights campaigner Peter Tatchell acted as chief witness at a packed ceremony at Islington Town Hall in London just after midnight as Peter McGraith and David Cabreza were wed after 17 years together.

Mr Tatchell said the couple and all the others getting married had "made history" and "made Britain a more tolerant, equal place".

With a crowd of photographers, journalists and well-wishers waiting, the couple took the opportunity to highlight the international struggle for gay rights.

Mr McGraith said: "Very few countries afford their gay and lesbian citizens equal marriage rights and 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."

Mr Cabreza added: "From a global and political perspective it's great too, but for us it's also about us and our marriage."

After marrying his partner Neil Allard at Brighton's Royal Pavilion, Andrew Wale said he found the ceremony "much more moving" than he expected.

"We were considering a civil partnership, even though we didn't think it was true equality, so we're very, very happy that this day has come, finally," he added.

Aarron Adem Erbas, who married Louis Monaco, also at Islington Town Hall, said: "We're going to celebrate the rest of the day and it means so much to us that we can have our friends and loved ones here. It's absolutely brilliant."

Image copyright Getty Images Image caption Andrew Wale and Neil Allard were the first same-sex couple to marry in Brighton

Image copyright AFP Image caption Phil Robathan and James Preston later married at Brighton Town Hall

Later on Saturday, a crowd of about 2,000 people - which included a number of celebrities - gathered to watch comedian Sandi Toksvig and her partner Debbie renew their civil partnership vows.

The couple, who entered into a civil partnership seven years ago, exchanged vows on stage at the Royal Festival Hall in London at a special event to celebrate the introduction of gay marriage in the UK.

Toksvig, who presents the BBC Radio 4 News Quiz, said it was "an astonishing moment in history", adding: "There was many a time I thought this day would never come."

Those in civil partnerships can choose to convert their relationships to marriage, via a procedure expected to be in place by the end of the year, but are under no obligation to do so.

Media playback is unsupported on your device Media caption Andrea Williams, Christian Concern: "This is actually very self-centred"

Archbishop of Canterbury Justin Welby said on Friday night the Church of England would now drop its opposition to same-sex marriage, as Parliament had spoken.

"The law's changed; we accept the situation," he told the BBC.

But some religious groups remain opposed to gay marriage.

Andrea Williams, chief executive of Christian Concern, said: "We can't just redefine an institution - redefine something that always has been - because we say it's something that we want.

"This is actually very self-centred. This is not about rights, it's about seeking cultural dominance and seeking to redefine marriage for all of us."

Image copyright Getty Images Image caption Peter Tatchell (left) was chief witness at Peter McGraith and David Cabreza's wedding in Islington

Image copyright Anthony Keiler Image caption Aarron Adem Erbas married Louis Monaco and said the day was "absolutely brilliant"

There will now be two legal definitions of marriage, says the BBC's social affairs correspondent Reeta Chakrabarti - that recognised by the CofE and many other religious groups, and that recognised by the state.

"The Church of England believes marriage is between one man and one woman for life," the Bishop of Norwich, the Right Reverend Graham James confirmed.

"It's untidy for the law to have two definitions... but I think we can live with untidiness."

The law prohibits the Church of England from performing same-sex weddings, and allows other religious organisations to refuse to perform them.

The CofE has urged clergy to support members of the congregation who are in same-sex marriages, but has ruled that priests themselves must not enter into one. The Roman Catholic Church opposes the change in the law.

Some gay vicars, though, have said they are prepared to defy their bishops by insisting they have a right to marry.

Image caption The Rev Andrew Cain says he does not want confrontation with the Church, but "must do what is right"

Among them is the Reverend Andrew Cain, who said the Church was entering uncharted territory, but he would not be "frightened" out of doing what he believed was right.

Mr Cain, who plans to marry his partner in the summer, said he would do so whether the Church approved or not.

Media playback is unsupported on your device Media caption Man tells BBC Radio 5 live: "I wouldn't go if I was invited"

"It is more important to do what is right than to be frightened into not doing what I believe to be true.

"And I won't be frightened by what the possible consequences are for me. I could lose my job, absolutely. Lose my job, my home and my place."

According to a BBC survey, a fifth of British people would turn down an invitation to a same-sex wedding - a finding the Roman Catholic group Catholic Voices suggested meant people remained "deeply uncomfortable" with the move.