Holyrood are to pass a law to automatically pardon gay and bisexual men who were convicted of sexual offences which are no longer illegal.
Members of the Scottish Parliament (MSP) unanimously backed the Historical Sexual Offences (Pardons and Disregards) Bill at stage one back in April.
In Scotland, all sexual activity between men was a criminal offence up until 1981, when sex between men over the age of 21 was decriminalised.
It was only in 2001 that the age of consent was lowered to 16 – the age of heterosexual consent.
And now the new law will pardon men convicted of having consensual sex with other men before it was decriminalised.
It will also allow men to apply to have convictions for same-sex relations that is now legal removed from central criminal conviction records, the BBC report.
First Minister Nicola Sturgeon said: "Those laws criminalised the act of loving another adult, they deterred people from being honest about their identity to family, friends, neighbours and colleagues.
"By sending a message from parliament that homosexuality was wrong, they encouraged rather than deterred homophobia and hate.
"Nothing that this parliament does can erase those injustices, but I do hope this apology, alongside our new legislation, can provide some comfort to those who endured those injustices."
The bill will give an automatic formal pardon to people, both living and dead, who were convicted of historical sexual offences where the conviction was for conduct which is now legal.