Sex offenders are being forced to share cells at Peterhead Prison because of "unacceptable" overcrowding, according to the chief inspector of prisons.
The prison was saved from closure last year
Conditions at the jail were assessed following last year's decision to save the jail from closure.
In his inspection report, Dr Andrew McLellan highlighted what he described as "chronic under investment" in the prison.
The Justice Minister, Cathy Jamieson, said the Scottish Executive was committed to tackling the conditions and promised to examine options to end slopping out.
"I shall be examining, with the Prison Service, a range of options for ending slopping out for Peterhead prisoners as part of our commitment to modernise prisons across Scotland," she said.
Last year a Prison Estates' Review proposed the closure of the jail, which houses a renowned unit for sex offenders.
The move sparked a major campaign to save the prison, which won cross-party backing.
In September Jim Wallace, then justice minister, announced that the it would stay open and be upgraded.
Safe and secure
The focus of Dr McLellan's report, which was based on an inspection in January, was on the conditions and the way prisoners are treated following the announcement on the jail's future.
The report, published on Tuesday, contained praise for much of the work at Peterhead Prison.
Staff-prisoner relationships were described as excellent and the regime was said to be safe and secure.
Dr McLellan raised concerns about sanitation
The chief inspector also described the prison as clean and tidy.
However, he was critical of overcrowding which has meant some long-term sex offenders having to share cells.
The prison has 25 more inmates than it was designed to hold.
Dr McLellan said that lack of funding has led to some "unacceptable conditions".
He was critical of the lack of integral sanitation within cells and said uncertainty about the prison's long-term future has led to low morale among staff.
The former Church of Scotland moderator said: "Much of the prison was clean and tidy and the food was very good.
"Conditions in some areas of the prison are however amongst the worst in the SPS - there is no access to night sanitation, no electric power in cells and there is doubling up in cells, which are far too small in any case."
He said the prison does not run enough programmes to meet the needs of its population.
His report said that not all of the prisoners who expressed interest in the acclaimed STOP programme for sex offenders were able to do so.
He said: "If long term sex offenders held in Peterhead are being treated differently from other long term prisoners simply because they are more compliant, then this must stop."
The chairman of the Scottish Prison Officers Association also praised the work of the staff at the prison but said under investment remains an issue.
Under investment doesn't help these issues, and in the very near future I hope some money is spent on Peterhead to upgrade it
Scottish Prison Officers Association
Dave Melrose said: "The overcrowding remains and the sanitation factor is still an issue.
"Under investment doesn't help these issues, and in the very near future I hope some money is spent on Peterhead to upgrade it."
Local Scottish National Party MSP Stewart Stevenson was among those who campaigned against the proposals to close Peterhead.
He said the report was an indictment of the Scottish Prisons Service, which had starved the jail of resources.
Ian Gunn, governor of Peterhead prison, said that he will be working alongside the Prison Service to eradicate the problems but he was unable to give a figure on how much it will cost to bring prisons up the required standard.
He said: "It is not an easy question to answer because if you take the Estates Review recommendation it would require us not to improve accommodation but to build new accommodation.
"The Prison Service does not have unlimited funds."