The collapse of the construction giant Carillion has focused attention on the contracts it had with the Government, one of which involved cleaning, landscaping and maintenance at 50 prisons in the south of England.
The prison contract came into effect in 2015, but within months major problems started to emerge, as prisoners, staff and inspectors reported long delays in getting cells, windows and toilets repaired.
The Ministry of Justice acknowledged that Carillion was under-performing and ordered the company to pay back millions of pounds - but its contract was allowed to continue until the work was taken in-house after the firm folded last month.
There've also been growing concerns about another contractor, Amey, which has a maintenance contract at 61 prisons in the north of England, the Midlands and Wales.
Amey's work came under the spotlight at Liverpool Jail which was described in a recent report as "squalid", with prisoners living in damp, dirty and cockroach-infested conditions.
The contracts, which are worth £200 million over five years, were intended to deliver savings of £115 million.
But Ministers have admitted that the Government won't achieve the economies it wanted to because it under-estimated how much it costs to maintain jails.
They say the new government-owned facilities management company which has taken on Carillion's work will secure "significant improvements" and have pledged to strengthen the management and oversight of its contract with Amey to deliver a better service.
But the Prison Officers Association says the failure to maintain prisons properly has fuelled frustration behind bars, contributed to increasing levels of violence and endangered the health and welfare of inmates.
File on 4 explores the background to the prisons maintenance contracts, the impact out-sourcing has had on prisoners, staff and the public and whether the solution lies in greater state control, an end to private sector involvement or more investment.
Reporter: Danny Shaw
Producer: Sally Chesworth
Editor: Gail Champion.