New Zealand MPs have apologised for the "tremendous hurt and suffering" they caused hundreds of men who were convicted of homosexuality more than three decades ago.
The parliament took the rare step on Thursday of issuing a formal apology to all those unfairly convicted under the antiquated laws.
MPs also approved the first stage of a bill that will allow the men to have their criminal records wiped clean.
The measures were passed with unanimous approval among MPs from various political parties.
The government estimates about 1,000 men will be eligible to have their convictions quashed. Most were prosecuted after 1965 and before 1986, when New Zealand decriminalised homosexuality.
Sex between women was never explicitly illegal under New Zealand law.
Same-sex marriage was legalised in New Zealand in 2013.