The New Zealand parliament on Tuesday night unanimously passed a bill that is expected to allow about 1,000 men to apply to have past convictions for homosexual activity removed from their criminal records.

Homosexuality was decriminalized in New Zealand in 1986, but men who were convicted before that date still have the convictions on their records.

Under the new law, family members will also be able to apply to have the criminal records of a deceased relative cleared.

Read more: Opinion: Same-sex marriage in Germany - a run-of-the-mill revolution

"I would like to apologize again to all the men and members of the rainbow community who have been affected by the prejudice, stigma and other negative effects caused by convictions for historical homosexual offences," Justice Minister Andrew Little said.

Righting wrongs

"This bill sends a clear signal that discrimination against gay people is no longer acceptable, and that we are committed to putting right wrongs from the past," Little said.

The convictions that can be erased relate to three offences that were removed in 1986 — sodomy, indecency between males and keeping a place of resort for homosexual acts, and two from 1908 involving "unnatural offences" committed with another male.

Applicants would have to show that, on the balance of probabilities, the sexual conduct they were convicted of is no longer illegal, which will generally involve an assessment of whether the activity was consensual and involved adults over the age of 16.

Countries that have legalized same-sex marriage 2001, The Netherlands The Netherlands was the first country in the world to permit same-sex marriages after the Dutch parliament voted for legalization in 2000. The mayor of Amsterdam, Job Cohen, wedded the first four same-sex couples at midnight on April 1, 2001 when the legislation came into effect. The new law also allowed same-sex couples to adopt children.

Countries that have legalized same-sex marriage 2003, Belgium The Netherlands' neighbor, Belgium, followed the Dutch lead and legalized same-sex marriage two years later. The law gave same-sex partners many of the rights of their heterosexual counterparts. But unlike the Dutch, the Belgians did not initially allow same-sex couples to adopt children. The Belgian parliament passed a bill granting them that right three years later.

Countries that have legalized same-sex marriage 2010, Argentina Argentina became the first Latin American country to legalize same-sex marriages when its Senate voted 33 to 27 in favor of it in July 2010. Argentina thereby became the tenth country in the world to permit gay and lesbian marriages. The South American country was not the only one to do so in 2010. Earlier in the year, Portugal and Iceland also passed same-sex marriage legislation.

Countries that have legalized same-sex marriage 2012, Denmark Denmark's parliament overwhelmingly voted in favor of legalization in June 2012. The small Scandinavian country had made headlines before when it was the first country in the world to recognize civil partnerships for gay and lesbian couples in 1989. Same-sex couples had also enjoyed the right to adopt children since 2009.

Countries that have legalized same-sex marriage 2013, New Zealand New Zealand became the 15th country worldwide and the first Asia-Pacific country to allow gay and lesbian marriages in 2013. The first couples were married on August 19. Lynley Bendall (left) and Ally Wanik (right) were among them when they exchanged vows on board an Air New Zealand flight from Queenstown to Auckland. France legalized same-sex marriage the same year.

Countries that have legalized same-sex marriage 2015, Ireland Ireland made headlines in May 2015 when it became the first country in the world to legalize same-sex marriage through a referendum. Thousands of people celebrated in the streets of Dublin as the results came in showing almost two-thirds of voters opting for the measure.

Countries that have legalized same-sex marriage 2015, USA The White House was alight in the colors of the rainbow flag on June 26, 2015. Earlier, the US Supreme Court ruled 5 to 4 that the constitution guaranteed marriage equality, a verdict that paved the way for same-sex couples to be married across the country. The decision came 12 years after the Supreme Court ruled that laws criminalizing gay sex were unconstitutional.

Countries that have legalized same-sex marriage 2017, Germany Germany became the fifteenth European country to legalize gay and lesbian marriages in June 30, 2017. The bill passed by 393 to 226 in the Bundestag, with four abstentions. German Chancellor Angela Merkel voted against the bill, but paved the way for its passage when she said her party would be allowed to vote freely on the measure only days before the vote took place.

Countries that have legalized same-sex marriage 2017 - 2018, Australia Following a postal survey which showed the majority of Australians were in favor of same-sex marriage, the country's parliament passed a law to legalize it in December 2017. As couples in Australia have to give authorities one month's notice of their nuptials, many of the first weddings took place just after midnight on January 9, 2018 - including that of Craig Burns and Luke Sullivan, pictured.

Countries that have legalized same-sex marriage 2019, Taiwan In May 2019, the island state became the first country in Asia to legalize same-sex marriage. The government survived an attempt by conservative opposition to water down the bill. Gay couples are able to offically register their marriage from May 24 onwards. President Tsai Ing-wen called it "a big step towards true equality."

Countries that have legalized same-sex marriage 2019, Ecuador The Andean state's top court ruled 5-4 to allow two gay couples to marry in June. The decision followed a ruling from the Inter-American Court on Human Rights affirming that countries should allow same-sex couples the right to marry. Author: Alexander Pearson



Following the UK

The bill was first introduced under the former National-led government in July 2017 by then-Justice Minister Amy Adams, who apologized to New Zealand men who had been convicted for homosexual acts.

New Zealand passed laws banning discrimination against gay people in 1993, and in 2013 it became the first country in the Asia-Pacific region to legalize same-sex marriage.

The new legislation follows in the footsteps of the United Kingdom, which last year enacted "Turing's Law," providing a blanket posthumous pardon to some 50,000 men who were convicted under old laws in the UK. Under the law, named after mathematician and World War II code breaker Alan Turing, people still alive with past convictions could also apply to have them quashed.

Turing received a posthumous pardon from Queen Elizabeth II in 2013 for a 1952 conviction involving gross indecency with a 19-year-old man, which led to calls for the blanket pardon for other men.

While Turing did not go to prison, he was chemically castrated and died of cyanide poisoning in what was determined to be a suicide two years later. Turing and renowned writer Oscar Wilde are arguably the most famous people to be convicted of homosexual acts in the UK; Wilde was imprisoned for two years and left jail in poor health, dying within a few years of his release.

Read more: Marriage for all: Celebrities tying the same-sex knot

The Australian states of New South Wales, Victoria and South Australia have also quashed historical convictions for homosexual activity, and in 2017, Germany erased the convictions of 50,000 gay men who were convicted under a Nazi-era law, and also offered financial compensation to some survivors.