Stonewall Scotland has said that the government's apology is an important moment for those criminalised
A formal apology to gay men who were convicted of abolished sexual offences has been welcomed.
First Minister Nicola Sturgeon will make the statement to coincide with new legislation which will automatically pardon those convicted under the laws.
Private homosexual relations between men aged over 21 were not decriminalised in Scotland until 1980, despite the law being changed in England and Wales 13 years earlier.
Speaking in Parliament, 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; and by sending a message from parliament that homosexuality was wrong, they encouraged rather than deterred homophobia and hate.
"Today as First Minister I categorically, unequivocally and wholeheartedly apologise for those laws and for the hurt and the harm that they caused to so many.
"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
"And I hope that it provides evidence of this parliament's determination in so far as we can to address the harm that was done."
The apology and new law has been welcomed by equality campaigners Stonewall Scotland.
Director Colin Macfarlane said: “The first minister’s apology is an important moment, both for the LGBT community and for Scotland. Gay and bi men in Scotland were criminalised for a very long time simply for who they were and who they loved.
“This apology will give a great deal of comfort to many who were unjustly prosecuted, and will help draw a line, once and for all, under a dark period in Scotland’s history.
“As well as the hurt and damage that came with being prosecuted for these crimes, many men have carried a criminal record with them their whole lives as a result. We’re very pleased to see that this bill includes provision for these unjust convictions to be wiped from criminal records, and a pardon, both for those living and deceased.”
Tim Hopkins, Director of the Equality Network, said hundreds of men would see convictions disappear.
“This very welcome bill will be of direct importance to hundreds of people with past criminal convictions for the kinds of relationships that were perfectly legal for their heterosexual friends," he said.
“More widely, it is a clear statement that Scotland considers the discrimination of the past to be wrong and unacceptable, and now understands LGBTI people to be equal citizens who deserve equal respect.”