A crisis-hit prison is being taken back into public ownership after the private company running it had its contract terminated.
Security firm G4S was awarded a 15-year contract to run HMP Birmingham in 2011.
In August 2018, Peter Clarke, the chief inspector of prisons, said the jail had fallen into a "state of crisis" and was the worst he had come across.
The Prison Service took it over, initially for six months, in August and will now run it permanently.
Prisons Minister Rory Stewart said the prison had "made good progress" since being taken back under public control, but needed "stability and continuity".
G4S said HMP Birmingham faced "exceptional challenges", including "high levels of prisoner violence towards staff and fellow prisoners".
It said it was "in the best interests of staff and the company" that control transferred to Her Majesty's Prison and Probation Service (HMPPS) .
In 2011, the government gave two estimates for the annual value of the contract to run HMP Birmingham - £21.1m to £31.2m.
It is the second time in three years that G4S has lost a major public sector contract.
It was forced to transfer the management of Medway Secure Training Centre to the government in 2016, after secret BBC filming showed staff allegedly mistreating children held there.
The company continues to operate four other jails, Altcourse, Oakwood, Parc and Rye Hill, as well as two immigration removal centres near Gatwick Airport - Brook House and Tinsley House.
HMP Birmingham will formally be returned to the public sector in July with staff automatically moving across.
The Prison Officers Association (POA) said the prison "should never have been privatised in the first place".
POA general secretary Steve Gillan said its members had campaigned hard to bring HMP Birmingham back under public control.
"We will continue to campaign to get all prisons under public control where they rightfully belong," he said.
Although there have been some improvements at HMP Birmingham, conditions at the jail are believed to remain extremely difficult with very high levels of violence.
Inspectors are due to return shortly to assess what progress has been made.
Roger Swindells, chairman of HMP Birmingham's Independent Monitoring Board, which conducts regular visits to the jail, said transferring it back to the public sector was "good news".
"I'm pleased there's some clear direction," he said.
"It takes away the uncertainty - prisoners and staff have lived under a cloud for the past seven months."
Follow BBC West Midlands on Facebook, on Twitter, and sign up for local news updates direct to your phone.