They are to be freed temporarily as part of a contingency plan to deal with Covid-19.Read more
BBC News NI Home Affairs Correspondent
BBC Scotland political reporter
MSPs have completed the amending stage of the Coronavirus (Scotland) Bill.
Government amendments to cut controversial plans to hold more trials without juries were unanimously agreed.
However proposals from the Greens to strengthen protections for tenants from eviction were voted down.
And votes on cutting back government plans to extend deadlines for Freedom of Information requests came back tied despite all opposition parties backing them, meaning the amendments fell on the presiding officer’s casting vote.
The parliament will now move to the final debate on the bill before members vote it through.
Newcastle Central MP Chi Onwurah has called for a "Digital Parliament" to be set up during the coronavirus lockdown.
She has received the backing of more than 100 fellow MPs in asking the Clerk of the House of Commons John Benger to move the work of Parliament online.
She said MPs "must lead by example" at the same time people were being told to maintain social distancing and stay at home.