MPs addressed Parliament with moving stories as a law was passed allowing convictions of men for homosexual offences to be expunged from the public record.
It's believed that more than 1000 gay men were convicted and shamed before homosexuality was legalised in 1986, and in July last year parliament formally apologised to them.
On Tuesday night, MPs unanimously passed a bill that gives them the right to apply for their convictions to be expunged.
Gay MP Grant Robertson was one of many who addressed the house tonight.
"We stand tonight, as a Parliament, and we say 'I'm sorry'. I say more than that ... I say 'I'm sorry'. As a man who has been able to live his life relatively freely as a homosexual male, as a person who is able to come to this Parliament and get heckled and abused by the National Party because I am the Finance Minister, not because I am a gay man.
"This law was and is wrong ... the constant fear and the reminder of the worthlessness and the shame of your mere existence is not something we can put away so easily because it echoes through generations."
Robertson said he had been deeply moved by men who had written to him who were affected by the law. He said the men were heroes.
He said there were mixed views about compensation among some of the men he had spoken to.
He said there was still more work to be done in the rainbow community.
"We should not be naive. If you're a young trans person growing up in rural New Zealand today, your life's not easy. You're likely to feel the stigma and the hurt that these men felt. Actually, if you're a young gay man you will still feel the same. Not every school in our country is a safe place if you are gay or lesbian, or bisexual, or transsexual or inter-sex."
Addressing Parliament, Hutt Valley MP Christopher Bishop said: "How could that have even happened in New Zealand?
"It's the right thing to say to our rainbow community: 'Your individual and collective humanity is affirmed and solidified by the legislation'.
"These laws should never have been in place. They did cause harm, they did cause grief, they did cause dissent and they did cause hate.
"And Parliament is now making a unanimous stand for tolerance and equality and diversity and I am so very pleased to commend this bill to the House."
Green MP Jan Logie said she took satisfaction from how uncontested the legislation was.
"We have heard how many lives were ruined by those laws and we have heard the experiences of men that were convicted and men who were not convicted but had their lives made small when they could have been huge.
"We heard of people isolated, stigmatised, beaten and abused because of these laws and we know that people have died and sadly still in some cases continue to die because of homophobia," she said.
"We need to remove the convictions and the shame from these innocent men who suffered horribly because of the decisions of Parliament to criminalise them.
"I hope the apology and this debate around the legislation does extend to remove the shame and blame from all the men and their families affected by this legislation, directly and indirectly."
National's North Shore MP Maggie Barry said this is a bill that was long overdue.
"This is a place that took too long to change the wrongs of the past but it has done so now and it is doing so tonight. I add my apology to the men down the decades who have suffered as a result of the love that they have felt as a natural instinct for another person."
Labour MP Louisa Wall, who sponsored the Marriage Amendment Bill which legalised same-sex marriage in 2013, said the condemnation of the behaviour came from England.
"I'm incredibly proud to come from a country and a Parliament where after 151 years of colonisation ... lest we forget, these laws came from our coloniser, this is part of our colonial history.
"I believe that England as a colonising power still has a lot of work to do to help us move from a world that is filled with hate to a world that is filled with love. I'm incredibly proud of our Parliament because we have stood up for love tonight."
Justice Minister Andrew Little acknowledged the apology, introduced by the previous government, and said he wanted to add his own.
"On behalf of this House and all members who have passed through it since it was established, sorry to those men who have carried the stigma and the shame of doing nothing other than expressing their love for the person that they did love, and for the families who shared that shame and embarrassment."
Applications for expungement may be made by the men themselves or by a representative, including a family member, if the person with convictions has died.
Similar moves for expungement have already been made in England, Wales and some Australian states and there were calls for it in 2016 to mark 30 years since the decriminalisation of homosexual acts.
A young IT developer, Wiremu Demchick, aged 26, petitioned Parliament in 2016 as well gathering 2111 signatures for an apology and expungement.
Demchick welcomed the final step and while expungement was being publicly discussed when he started his petition, he wanted it to become a priority for the Government.
The Criminal Records (Expungement of Convictions for Historical Homosexual Offences) Bill was introduced last year by former Justice Minister Amy Adams and at the same time Parliament unanimously supported an apology from the House.
The apology said: "That this House apologise to those homosexual New Zealanders who were convicted for consensual adult activity, and recognise the tremendous hurt and suffering those men and their families have gone through, and the continued effects the convictions have had on them."
Justice Minister Andrew Little took over the bill and suggested during the committee stages last week that another apology will be forthcoming in tonight's third reading.
The Secretary of Justice will receive each application and decide whether it meets the test – the test being that the conduct that constituted the offence would not be an offence today. The effect would be that if the person was required to provide a criminal history for, say, employment, the conviction would not have to be declared.
It would be as though there had never been a conviction.
However, the conviction may still have to be declared in other countries, depending on the question asked. If the question was whether the person had been arrested, they would have to answer yes.
It will also be an offence for an official to knowingly disclose that there had been a conviction.
An expunged conviction cannot be considered when making safety checks under the Vulnerable Children Act for people involved in regular contact with children. And an expunged conviction or non-disclosure on one cannot be grounds to refuse to register someone as a teacher.
Homosexual acts between consenting males aged 16 and over was decriminalised in 1986 and Statistics New Zealand records show that between then and 1965, nearly 1000 men were convicted of indecency.
Of those, 138 received a prison sentence and the others were fined or given community-based sentences.
But those eligible for expungement are convictions between 1908 and 1986 which meet the test.
An expungement – getting rid of a conviction for conduct which was criminal at the time - is not to be confused with a pardon which, under New Zealand law, means finding that the convicted person never committed the conduct.
Little told Parliament last week that the Government was not considering a compensation regime because it was "too problematic and too complex to contemplate".
"It would be equally unfair to say 'right, everybody gets the same amount.'"