Right to vote could be extended to prisoners under new laws
Prisoners serving a sentence of less than 12 months could get the right to vote under new legislation.
The new laws would also extend the right to vote to anyone legally resident in Scotland, adding 55,000 people to the electoral register.
The change is being proposed in the wake of the Scottish government giving voting rights to 16 and 17-year-olds.
The bill will also restate the rights of European Union citizens resident in Scotland to take part in elections.
The Scottish Elections (Franchise and Representation) Bill would not apply in UK General Elections, where the franchise is controlled by Westminster.
There is currently a blanket ban preventing convicted prisoners from voting in elections despite a European Court of Human Rights ruling to the contrary.
Speaking as the Bill was published, Holyrood's business manager, Graeme Dey MSP, said ministers had decided not to extend voting rights to all prisoners.
"We are confident that restricting prisoner voting to those serving sentences of less than 12 months means we can comply with the [European] court's ruling," Mr Dey said.
"This measure will also support rehabilitation and reintegration back into society in order to reduce reoffending."
He added that it was "only fair" foreign nationals living in Scotland could vote and stand in Scottish Parliament and Scottish council elections.
Mr Dey said: "Scotland has already led the way by lowering the voting age to 16 and we are building on this progress by extending the right to vote to everyone legally resident here."
Mr Dey said the move was backed by a public consultation undertaken in 2018 which found 92% of organisations and 78% of individuals supported such a reform.
Why is prisoner voting an issue?
A court in Strasbourg ruled in 2004 that a blanket ban on all British prisoners voting contravened the European Convention on Human Rights (ECHR).
But in 2017, the UK government announced a compromise, which satisfied the court, allowing a limited number of prisoners the vote.
Responsibility for deciding who votes in Scottish Parliament and council elections is now the responsibility of Holyrood.
Proposals to allow prisoners to vote in the independence referendum in 2014 were rejected at the time by the Scottish Parliament, with legal challenges from prisoners who wanted take part in the vote also being dismissed by the courts.
What did the Equalities and Human Rights Committee say about it?
In 2018, a majority of MSPs on the Equalities and Human Rights Committee said the current ban should be lifted for all prisoners, regardless of what crimes they have committed and what sentences they are serving.
The committee's recommendation was backed by SNP, Labour and Liberal Democrat members of the committee, as well as by the Scottish Greens, but was opposed by the Conservatives.
Nicola Sturgeon said prisoners jailed for the most serious crimes should not be allowed to vote in elections in Scotland.
Only prisoners on remand and those on a tag serving a sentence in the community are currently allowed to vote in UK elections.