MEN who were convicted in Scottish courts for having consensual gay sex will receive a full pardon, it has been announced.

In a historic announcement, justice secretary Michael Matheson said legislation would be brought forward that will see pardons issued where they relate to same-sex sexual activity that is now lawful.

In Scotland, consensual sex between men was only decriminalised in 1980 and the age of consent for same-sex sexual activity was not equalised for sexual activity between men and women until 2001.

Steps will also be taken to ensure convictions imposed for consensual sex between men no longer appear on criminal record checks.

Michael Matheson, the justice secretary, made the announcement in Holyrood after Kezia Dugdale, the Scottish Labour leader, asked whether the Scottish Government would quash the convictions and cautions issued to people for now-abolished gay sexual offences and issue pardons.

It follows the SNP MP John Nicolson seeing a private members bill at Westminster, which would have seen similar pardons granted south of the border, blocked by the UK Government.

Mr Matheson said that it was "shocking" that consensual gay sex had remained illegal until 1980 and that steps must now be taken to "right the wrong" for those still living with convictions.

He added: "We will introduce an automatic formal pardon for those convicted under these discriminatory laws so they know they are absolved fully. We want to address the injustice that people experienced simply because of their sexual orientation in circumstances that are now legal and this is one way of achieving this.

"Information on these convictions is held on Police Scotland records and we have engaged with Police Scotland to seek views on steps that could be taken to right these historic wrongs.

"I have instructed my officials, working in partnership with Police Scotland, to determine the practical steps required to establish a scheme to allow men convicted for actions that are now legal to seek to have those convictions disregarded. Where an offence is disregarded a person will be treated as not having been convicted of that offence and so it would not appear on, for example, disclosure checks.

"I know Parliament will want to work together to resolve these important issues."

Although the Scottish Government was not responsible for the legal system under which most of the convictions took place, Mr Matheson said he would also consider issuing a formal apology on behalf of the state to those found guilty.