But the vote was not without controversy. Tau Henare lashed out his National Party colleagues for last minute behind the scenes manouvering in support of a referendum.

That would have delayed a vote till the next election and sparked furious last-minute efforts on both sides of the debate to shore up their numbers.

Mr Henare said he was "appalled at some of the behaviour I've seen tonight and outright not telling the truth".

On attempts by his colleagues to get him to withdraw his support for the legislation and back a referendum, he said: "If I was to believe them then why aren’t we having a referendum on asset sales?"

There are more votes ahead before the bill becomes law but after last night's vote it seems assured of success.

MPs who stood to debate the bill revealed the issue had been a deeply personal one.

Hamilton West MP Tim Macindoe, who opposed the bill, said MPs had been lobbied by thousands of people and while most had been sincere, "a few have been aggressive, insulting......and far more bigoted than anyone I’ve heard arguing for the status quo".

He could not support the bill because of his Christian faith "and my difficulty in believing that God wants this change to be made".

National MP Chester Burrows revealed there had been an ugly side to the Christian lobby, however, and that had caused some MPs to change their votes.

National MP Chris Auchinvole said what he had learned from listening to submissions was that "each homosexual, lesbian, bisexual, transexual, person appearing before us was not just to be seen as an individual, not just to be identified by gender preference but in fact as a mothers son, or daughter, and a fathers daughter or son, the sibling, to their brothers and sisters, grandchildren to their grandparents, nephew and nieces to their Uncles and Aunts and Uncles and Aunts to their nieces and nephews, cousins to their cousins."

Louisa Wall, the lesbian Labour MP who is championing the law change, said she was moved by the depth of feeling of those affected by the bill.

"We are normal, and we are entitled to the same rights as every other citizen."

The bill was about marriage equality - "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. 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. It’s essentially not recognising someone as a person. No state has the right to do that."

The bill also caused some heated debate;

Labour MP Trevor Mallard said he chaired the committee which heard submissions on the Homosexual Law Reform Bill in 1986.