The Scottish Government will pardon all men convicted of historic same-sex crimes, the justice secretary has said.

Michael Matheson told MSPs at Holyrood on Tuesday he will bring forward new legislation to pardon those convicted of now abolished crimes relating to homosexual activity.

The Scottish Government say it has been working with Police Scotland since the summer on how best to ensure those who are pardoned have the crimes removed from their criminal records.

The move comes after a private member's bill put forward by SNP MP John Nicolson failed to pass through the House of Commons last week.

The UK Government has pledged to instead amend existing legislation which would sanction a pardon of those convicted of similar crimes in England and Wales.

Matheson told Holyrood: "It is sadly the case that Scotland has only relatively recently modernised our criminal laws so that they no longer discriminate against same-sex sexual activity.

"It is shocking to consider that consensual sex between men was only decriminalised in Scotland in 1980 and the age of consent for same-sex sexual activity was not equalised for sexual activity between men and women until 2001.

"Such laws clearly have no place in a modern and inclusive Scotland. However, there are people with criminal convictions for same-sex sexual activity that is now lawful and we must right this wrong."

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."

"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."

Scottish Labour leader Kezia Dugdale and Scottish Green co-convener Patrick Harvie have called on the Scottish Government to offer a full apology to those convicted of the crimes.

Same-sex sexual activity was legalised in Scotland in 1980.