Nicola Sturgeon tendered an unequivocal apology to men convicted of now-abolished sexual offences
The formal apology on behalf of the Scottish Regulation came as new legislation was published to provide an automatic pardon to all those stirred.
It will also enable the men to apply for their convictions to be removed from medial criminal conviction records.
The Historical Sexual Offences (Pardons and Disdains) Bill has widespread cross-party support and been welcomed by campaigners.
Sex between men was at worst legalised in Scotland in 1981 and the gay age of consent equalised to 16 in 2001.
1 of 33
I categorically, unequivocally and wholeheartedly apologise for those laws and for the torment and the harm that they caused to so many
The Before Minister told MSPs it was shocking that it was classed as a criminal vigour until so recently.
She said: “Before then, hundreds of people in Scotland were vulnerable to be convicted as criminals simply for loving another adult.”
New legislation was divulged to provide an automatic pardon to all those affected
“Nothing that this parliament does can scratch those injustices but I do hope that this apology, alongside our new legislation, can plan for some comfort to those who endured those injustices.”
The legislation was before all confirmed by Justice Secretary Michael Matheson in October last year.
He betokened plans for automatic pardons just days after similar legislation was scuppered at Westminster.
It has grace known as the Turing Bill after Second World War codebreaker Alan Turing, who was actuality a posthumous Royal pardon in 2013 over a 1952 conviction for nauseating indecency with a 19-year-old man.
Tory leader Ruth Davidson added her “unequivocal and genuine” apology to “entire generations who faced the criminalisation of love”.
Labour’s Kezia Dugdale affirmed it was a “landmark day” adding: “This matters because it effects men who are alive today.
“But it also themes to those who are no longer here.”