Prisoners are to be given the right to vote in the Shetland by-election.
The move, announced by the Scottish Government on Thursday, will ensure compliance with the European Convention on Human Rights.
A European Court of Human Rights (ECHR) ruling in 2005 said the UK Government’s blanket ban on prisoner voting breached human rights laws.
However, successive UK governments resisted changing the law in order to allow prisoners the right to vote.
A dispute between the UK and the European Court on the issue finally ended in 2017 when voting rights were given to around 100 inmates in England and Wales released on “temporary licence”.
Powers over the franchise for Scottish Parliament elections were devolved in 2017, with Holyrood and the Scottish Government legally obliged to comply with the ECHR.
The Shetland by-election will be held on August 29, having been triggered by the resignation of Scottish Liberal Democrat MSP Tavish Scott.
Ahead of the vote, Scottish Constitutional Relations Secretary Michael Russell said he will make a Remedial Order to bring the franchise for the by-election into line with the ECHR ruling.
It will allow prisoners who meet the wider franchise criteria, and who are serving sentences of 12 months or less, to register for a vote in the by-election in time for the August 13 deadline.
It is estimated the order will extend the franchise to fewer than five people.
MSPs have discussed proposals to extend voting rights to prisoners in Scotland for future devolved elections in the country, with the Scottish Elections (Franchise and Representation) Bill due to be considered when Holyrood returns from summer recess.
Mr Russell said: “The courts have been crystal clear – the blanket ban on prisoner voting is not compliant with the ECHR.
“Whether people agree with that or oppose it, one thing everyone should agree on is that elections must be compliant with the law.
“And unlike the UK Government who did not rectify this issue for more than a decade, the Scottish Government is legally obliged under the Scotland Act to comply with the ECHR.
“The timing of the by-election means action must be taken now, on a temporary basis, to ensure Scotland does not breach the ECHR.
“The order will then be repealed prior to the full parliamentary debate on legislation to put in place a long-term solution to the issue.
“The resignation of the sitting Shetland MSP means that we have to move quickly to bring the resulting by-election into line with the law.
“This is a pragmatic, short-term solution and our intention is that Bill currently before Parliament, if passed, will provide the longer-term solution.”
Scottish Liberal Democrat justice spokesman Liam McArthur said: “Liberal Democrats have been calling for changes to prisoner voting rules for years.
“The existing blanket ban on prisoner votes flouts international law and impedes rehabilitation.
“We think it’s important to build civic responsibility among the prison population. This is a fair and progressive change.”