Image copyright PA Media Image caption Barlinnie dates from the 19th Century

MSPs say "urgent action" is needed to address the pressure on Scotland's overcrowded prisons.

Holyrood's public audit committee said conditions in the largest jail, HMP Barlinnie in Glasgow, were so poor that a contingency plan was needed in case it became uninhabitable.

The report warned "if Barlinnie fails, the whole prison system is at risk".

Justice Secretary Humza Yousaf told BBC Scotland contingency plans were in place.

However, he said a "catastrophic failure" was not anticipated at the prison.

The Scottish Prison Service (SPS) said its challenges had been recognised with increased funding.

But the report from Holyrood's public audit committee said an increase in demand and "10 years of capital under spend" were to blame for the pressures on the prison service.

Public audit committee convener and Labour MSP Jenny Marra said there were "significant and wide-ranging challenges" for the SPS and Scottish government to overcome.

She told BBC Radio's Good Morning Scotland programme: "Barlinnie is the oldest jail in Scotland. It's a Victorian building. It's 50% over-capacity. The state of the building is deteriorating and what the committee found was that the SPS has no contingency plan.

"If that building were to fail then the SPS didn't have an answer for us on where those 1,500 prisoners would go."

She added that the SPS needed to be in "better shape" to deal with the challenges it faced across Scotland.

Scotland's prison population

In December last year, a report from Holyrood's justice committee called for more money to be given to the SPS after Audit Scotland said that, in real terms, the prison service's revenue budget had dropped by 14.2% over five years.

Wendy Sinclair-Gieben, the chief inspector of prisons for Scotland, has previously described conditions at Barlinnie as "shocking".

A replacement for Barlinnie is currently expected by 2025 but the public audit committee report warns possible delays to the project must be planned for.

They also describe suggestions to double-up prisoners in individual cells at other jails would be a "a step backwards rather than forwards".

The report points out that payments to prison staff doing extra work to cover absences has nearly doubled in the space of three years as a result of a surge in sickness absence and prisoner numbers at high levels.

Image copyright PA Image caption HMP Barlinnie in Glasgow is operating over capacity and has been described as the "biggest risk of failure" in the prison estate

A SPS spokeswoman said: "The safety and wellbeing of those living and working in our prisons is a priority for the SPS and it is to the credit of our staff that good order is maintained across our estate.

"It is well documented that the SPS is managing an increased prison population who have challenging and complex needs.

"The recent budget announcement by the Scottish government acknowledges the significant challenges the service faces, particularly in response to population numbers, and our settlement for 2020-21 has increased in recognition of these pressures."

Humza Yousaf told BBC Radio's Good Morning Scotland programme: "For every single part of the prison estate we have a contingency plan, for example if there were to be some sort of catastrophic failure.

"We would move them [prisoners] partly across the estate but there may be other solutions that we would also have to look at as well, but nobody is anticipating a catastrophic failure at Barlinnie.

"What we're anticipating is investment going into the current estate, including Barlinnie, building the new Barlinnie and of course working with the prison estate to see what other further improvements can be made.

"But of course, ultimately, if we reduce the prison population we ease the pressure on Barlinnie, we ease the pressure right across the estate."