New Zealand has announced plans to erase historic convictions for engaging in gay sex, apologising to those branded criminals under old laws.
Homosexuality became legal in New Zealand in 1986 but people who were convicted before then still have the offence listed on their official records.
Justice Minister Amy Adams said such convictions could appear on criminal history checks and in some cases had to be disclosed while applying for jobs.
She said people would soon be able to have them expunged from official records.
"It means people will be treated as if they had never been convicted and removes the ongoing stigma and prejudice that can arise from convictions for homosexual offences," she said.
"I acknowledge the pain that these New Zealanders have lived with and hope that this will go some way toward addressing that."
Ms Adams apologised to those she said had lived with years of stigma and prejudice.
"We are sorry for what those men and their families have gone through and the continued effect the convictions have had on them," she said.
The justice department said the convictions related to three offences that were dropped in 1986: sodomy, indecency between males and keeping a place of resort for homosexual acts.
It is estimated about 1,000 people will be eligible to apply to have their records cleared when the scheme takes effect next year.
To qualify, the sex that led to the conviction must have been consensual and taken place between adults aged 16 years or older.
Family members can also apply to have the records of a deceased relative cleared.
After legalising homosexuality in 1986, New Zealand passed laws banning discrimination against gays in 1993 and introduced same-sex marriage in 2013.
Britain this month enacted "Turing's Law", giving a blanket posthumous pardon to almost 50,000 men convicted under old laws in England and Wales.
Named after the WWII code-breaker and mathematician Alan Turing, it also allows living people to have their convictions erased, although they must apply individually.