Parliament has voted to legalise gay marriage in New Zealand, making it the 13th country to allow it and the first in the Asia-Pacific.
Gay marriage is legal in New Zealand.
The 77-44 vote in parliament on Wednesday night was greeted with cheers and applause from packed public galleries and kicked off celebrations around the country.
New Zealand is the 13th country to legalise gay marriage and the first in the Asia-Pacific.
More than 1000 Australian same-sex couples say they will cross the Tasman to tie the knot.
"Now that marriage equality is only three hours away there will be a flood of couples flying to New Zealand," said Australian Marriage Equality spokesman Rodney Croome.
NZ Labour's gay MP Louisa Wall promoted the Marriage (Definition of Marriage) Amendment Bill and it was passed on conscience votes, with no instructions from parties.
Prime Minister John Key was one of those supporting it.
MPs have been under intense pressure from churches and moral conservative lobby groups during the past few weeks but the final vote was almost identical to those cast during the bill's previous three stages.
"Excluding a group in society from marriage is oppressive and unacceptable," Ms Wall said when she launched the third reading debate.
"This is not about church teachings or philosophy, it never was. The principles of justice and equality aren't served if the key institution of marriage is reserved for heterosexuals only."
The Green Party's gay MP Kevin Hague said he had been with his partner for nearly 29 years.
"Until this day a basic human right has been denied us," he said.
"The consequences of this bill will be that same sex couples will marry, transgender people will no longer have to divorce, prejudice and violence will be undermined, the world will be a better place and absolutely no one will be any worse off."
National's Maurice Williamson, a strong supporter, said he had been appalled by some of the lobbying.
"I had a letter saying I was going to burn in the fires of hell, some of the bullying tactics were really evil."
NZ First leader Winston Peters again called for a referendum.
"Some say there is a groundswell for change, but how do we know that?" he said.
"New Zealand is supposed to be a democracy and what we are about to do is circumvent any expression of public opinion."
Mr Peters and his MPs voted against the bill.
Nearly all the MPs who spoke in the debate supported the bill.
One who didn't was National's Jonathan Young.
"History has invested significant tradition in marriage and I believe we should maintain that tradition," he said.
"This issue isn't as clear as some people think, many are struggling with it and the community is more divided than this parliament."
Although Wednesday night's vote put the bill into law, gay couples who want to marry will have to wait a while.
The Department of Internal Affairs which handles births, deaths and marriages has been given four months to get its act together and prepare the procedures and licence forms.
Ms Wall expects there will be a rush.
"The first week of August could work for a lot of people," she told NZ Newswire.
GAY MARRIAGE ACROSS THE WORLD
With New Zealand becoming the first country in the Asia-Pacific region to legalise same-sex marriage, here is a breakdown of nations with similar laws on the books:
- NETHERLANDS: On April 1, 2001 the Netherlands became the first country in the world to legalise same-sex marriage, with the same rights as heterosexuals. Includes the right to adoption.
- BELGIUM: Homosexual couples in Belgium have almost the same rights as heterosexuals. They won the right to marry in 2003 and in 2006 parliament voted into law a bill allowing homosexual couples to adopt children.
- SPAIN: In 2005 Spain became the third member of the European Union to pass a law allowing same-sex marriages. Gay couples can adopt children, whether they are married or not.
- CANADA: Canada adopted a national law allowing gays to marry and adopt in July 2005 though most provinces had already allowed same-sex unions before that date.
- SOUTH AFRICA: The country legalised same-sex unions and adoptions by gay couples in November 2006, becoming the first African nation to do so.
- NORWAY: A 2009 law allowed homosexuals to marry and adopt children. Civil partnerships have existed in the country for 20 years.
- SWEDEN: Sweden's homosexuals have been allowed to wed in religious or civil ceremonies since May 2009.
- PORTUGAL: Under a 2010 law Portugal legalised gay marriage, while excluding the right to adoption.
- ICELAND: Prime Minister Johanna Sigurdardottir married her long-time partner in June 2010 as a new law legalising homosexual marriages came into force. Same sex couples who have lived together for at least five years have had the right to adopt children since 2006.
- ARGENTINA: Gays in Argentina became the first on the South American continent to be able to wed and adopt, after legislation passed on July 14, 2010.
- DENMARK: Denmark, the first country in the world to allow gay couples to enter into civil unions in 1989, voted overwhelmingly in favour of allowing homosexuals to marry in the state Evangelical Lutheran Church in June 2012.
- URUGUAY: Uruguay voted this month to allow same-sex marriages nationwide, making it only the second Latin American country to do so.
-- PARTIAL RULES --
Gay couples can marry in nine US states, as well as in the capital Washington, while parts of Mexico and Brazil also allow same-sex marriage.
-- EXPECTED SOON --
- FRANCE: France's upper house Senate voted last week to approve a landmark bill granting homosexual couples the right to marry and adopt, putting the bill on track to become law within weeks.
- BRITAIN: British lawmakers voted in February in favour of controversial legislation allowing gay marriage despite fierce opposition from members of Prime Minister David Cameron's Conservative party.
The bill must next be scrutinised by a committee of lawmakers and then go before the upper chamber the House of Lords before becoming law.
-- CIVIL UNIONS --
A number of other countries have adopted laws that recognise civil partnerships and give couples more or less the same rights as heterosexuals.
Countries to have recognised civil unions without yet accepting gay marriage include Germany (2001), Finland (2002), the Czech Republic (2006), Switzerland (2007) and Colombia and Ireland (both 2011)