New Zealand has become just the thirteenth country in the world to support gay marriage.
Labour MP Louisa Wall's Marriage (Definition of Marriage) Amendment Bill, allowing same-sex couples to marry, has passed its third reading and final vote in Parliament.
In front of a packed public gallery 77 MPs voted in favour, and 44 voted against the bill this evening.
The vote promted cheers, applause and the singing of waiata from the public gallery.
"Two-thirds of parliament have endorsed marriage equality, Wall told reporters after the vote.
"It shows that we are building on our human rights as a country."
The bill was widely expected to pass, given similar support for the change in a preliminary vote held last month.
Officials now have four months to get the paperwork in order before the first same-sex couple can marry.
Hundreds gather to watch
Wall started her speech by noting the overflowing public gallery, with hundreds turning up to watch history being made.
"My observation in my time in the House has been that there are few occasions when the public gallery is full to overflowing. This Bill has seen a full gallery at the first and second readings and again tonight," she said.
"Having Parliament recognise and address injustices and
unfairness matters to those affected by it. It's the start of
a healing process," she said.
She said the third reading was "our road towards healing and including all citizens in our state institution of marriage regardless of their sex, sexual orientation or gender identity."
Wall's speech was received with a standing ovation and rounds of applause.
However there was fierce debate until the bitter end, with New Zealand First's Winston Peters saying a referendum was needed and that the public has not been properly informed about the issue.
"There has hardly been a debate. There has been a small but vocal minority and anyone who disagrees is (condemned as) a bigot," he said.
Parties have been thrown across the country to welcome the passing of the Bill, while supporters like newlywed Lynda Topp watched the vote in Parliament.
In a statement earlier today Topp explained why she felt it was important to be able to marry her partner.
"Everybody should be able to stand up and say 'I'm getting married'," she said.
"A Civil Union is demeaning, this idea that you will never be good enough, that your love is somehow less than or not as worthy.
"There's no romance to it. And today, I feel more romantic and more in love than I've ever felt in my life."
Wall, who put forward the Bill selected by a ballot, said denying someone the right to marry was like not recognising them as a person.
"This Bill is about marriage equality. It's not about gay marriage, same sex marriage or straight marriage. It's about marriage between two people. There's no distinction to be made. That is equality," she said.
"Whether the form of that marriage is religious, secular or cultural is a matter for the couple to determine.
"Denying marriage to a person is to devalue that person's right to participate fully in all that life offers, no state has the right to do that."
Critics said public opinion was divided on the issue and MPs did not have a mandate to make such a major change.
Family First national director Bob McCoskrie said polls show the country is split right down the middle when it comes to gay marriage and making such a change in such a short period of time is unacceptable.
The bill passed its first reading in August last year with 80 in favour and 40 against and its second reading with 77 votes in favour to 43 last month.
The matter was left to individual MPs to decide on their support, rather than follow party lines.