The Ministry of Justice is stepping in to take over the running of HMP Birmingham after officials decided private contractor G4S could not cope with the out-of-control prison.
It comes after a damning critique was issued by the prison watchdog warning that the Birmingham jail had "slipped into crisis" after its latest inspection uncovered "appalling" squalor and violence.
In a letter to David Gauke, the justice secretary, Chief Inspector of Prisons Peter Clarke noted that many staff felt fearful and unsafe after a number of violent incidents, including an arson attack that destroyed nine vehicles in the car park.
He wrote: "It was often difficult to find officers, although we did find some asleep during prisoner lock-up periods.
"On more than one occasion we found groups of staff who had locked themselves in their own offices.
"We were told this was to prevent them, when busy, from being distracted by prisoners - an explanation that was neither plausible nor acceptable."
Mr Clarke said he was "astounded" by the deterioration of the prison since it was last inspected in February 2017, and concluded: "There has clearly been an abject failure of contract management and delivery."
The MoJ, which will take over running of the jail for an initial six-month period, said there were "serious concerns over safety, security and decency".
Officials say the action is justified under the terms of the MoJ's contract with G4S, because of the firm's failure to run the prison safely, representing a breach of contract.
The government insists there will be no additional cost to the taxpayer.
Under the contract, G4S is liable for any additional costs where there has been a forced "step-in."
G4S has welcomed the move.
The notorious prison, which was the scene of rioting in 2016, has been issued with multiple improvement notices this year.
In March, one notice related to concerns about high levels of violence, low levels of activity and cleanliness.
Most recent figures show that Birmingham had the largest volume of assault incidents of all prisons in the 12 months to July 2018, with a total of 1,434.
In July, the prison was graded "poor" in all four categories: safety, respect, activity and resettlement.
The urgent notification notice was the first issued for a prison run by a private company and it requires the government to formulate an action plan within 28 days to make improvements.
Today's measures include:
:: Putting in place a new governor to lead the prison, which Sky News understands will be Paul Newton, the former governor of Swaleside prison. He will also have a new senior management team.
:: Allocating experienced HMPPS officers to bolster existing staffing at the prison. An initial 30 extra officers will be deployed.
:: Reducing the prison's capacity by 300 places while improvement action is under way.
:: The six-month government-run period may be extended if ministers are not satisfied sufficient progress has been made.
Prisons minister Rory Stewart said: "What we have seen at Birmingham is unacceptable and it has become clear that drastic action is required to bring about the improvements we require."
Mr Stewart told Sky News that government cuts to spending on prisons are not behind Birmingham's problems.
"The big driver of the problems has been these new type of psychoactive drugs like spice that have a massive impact on people's brains, creating aggression," he said.
Mr Stewart said substances had found their way into the prison through mail, inmates swallowing drugs and drones.
He said: "This is why we have spent £6m on special scanners and we have trained sniffer dogs to detect these drugs."
He said that while there had been failings by G4S at Birmingham, the company ran three of the best prisons in the country.
Asked about government cuts, he said: "There have been 2,500 extra prison officers recruited. I'm pleased to say that prisons are fully staffed."
He added: "This step-in means that we can provide additional resources to the prison while insulating the taxpayer from the inevitable cost this entails.
"We have good, privately run prisons across the country and while Birmingham faces its own particular set of challenges, I am absolutely clear that it must start to live up to the standards seen elsewhere."
Jerry Petherick, managing director of G4S's custody and detention services, said: "HMP Birmingham is an inner-city remand prison which faces exceptional challenges including increasingly high levels of prisoner violence towards staff and fellow prisoners.
"The well-being and safety of prisoners and prison staff is our key priority and we welcome the six month step-in and the opportunity to work with the Ministry of Justice to urgently address the issues faced at the prison."
Shadow justice secretary Richard Burgon said the situation was a consequence of privatisation in the justice system.
He said: "HMP Birmingham was the first publicly run prison to be transferred to the private sector. This should be a nail in the coffin for the flawed idea of prison privatisation. The government must scrap its recently announced plans to build yet more private prisons."
Labour leader Jeremy Corbyn said there would be no privatised prisons if his party wins power.
He said: "Another week, another privatisation crisis. This government's obsession with selling off our public services has been a total failure.
"Under Labour there'll be no more privatised prisons. We'll run them safely, efficiently, and accountable to the public. "