Scots who were convicted under laws which criminalised homosexuality should be pardoned, opposition parties have said.

The UK Government has agreed to an amendment which would posthumously pardon thousands of men convicted of homosexual acts in England and Wales before 1967.

The amendment to the UK Policing and Crimes Bill, dubbed the Alan Turing law after the famous code-breaker who was convicted for gross indecency, will also mean thousands of living men would be eligible for pardons.

A separate private members bill from SNP MP John Nicolson, which would give a blanket pardon to those still living, was defeated in the House of Commons on Friday.

The Scottish Liberal Democrats and Scottish Labour are calling for a similar law to be passed in Scotland.

Homosexual activities were only legalised in Scotland in 1980.

Scottish Labour leader Kezia Dugdale said: "I very much welcome the news that gay and bisexual men convicted in England and Wales are to receive posthumous pardons and that thousands of men who are still alive will become eligible for a pardon.

"I also congratulate John Nicolson on his attempt to introduce automatic pardons.

"Such steps have been a long time coming. Alan Turing is a British hero who deserves to be remembered for what he did for our country, not remembered because of his sexuality.

"The same is true for the countless other men who contributed to our society, and I hope the new measures will bring comfort to many families."

She added: "But, sadly, Scotland trails behind England and Wales when it comes to righting this wrong.

"I urge the Scottish Government to explore every option to ensure that men in Scotland can receive pardons.

"The SNP will have the full support of Scottish Labour in this objective."

Liberal Democrat MSP Alex Cole-Hamilton said: "These men did nothing wrong. It is absolutely right that their convictions under these outdated and discriminatory laws are pardoned.

"With the Policing and Crime Bill largely applying to England and Wales we need to ensure that men in Scotland can benefit from this change too.

"The Scottish Government needs to explore all options to ensure that this happens as a matter of urgency."

He added: "Whether the best course of action is a legislative consent motion, fresh legislation or an amendment to another bill, we need to act quickly. I am sure they will have the support of the whole parliament if they do so.

"The success of this amendment shows Liberal Democrats continue to be the strongest voice on equality at both the UK and Scottish Parliaments."

While the amendment means there are thousands of men in England and Wales who are eligible for a pardon, it is thought there is a far smaller number who would be eligible under a similar law in Scotland.

A Scottish Government spokesman said: "We will consider carefully whether similar legislation could be brought forward in Scotland."