Dozens of prisoners have taken part in a disturbance lasting several hours at a Nottinghamshire prison heavily criticised in a report this week.
The Ministry of Justice (MoJ) said the incident on Saturday at HMP Ranby had involved 30 to 60 prisoners, and caused "minor damage" but no injuries.
The Prison Officers' Association said it had started when 120 inmates on one wing refused to return to their cells.
The jail was criticised in a report this week for high levels of violence.
The incident began at about 12:00 BST and was not resolved until about 20:10 on Saturday evening.
Glyn Travis, assistant secretary of the Prison Officers' Association (POA), said it had been a "serious incident" that "actively involved" 60 prisoners.
He said 120 prisoners had refused to return to their cells and some had "taken control of a unit". During the disturbance, inmates had started a fire that was quickly brought under control, he added.
Mr Travis also said the response had involved national resources being sent to the prison to try to establish a surrender plan.
BBC news correspondent Alison Freeman said that at about 20:00 BST, prison vans were seen leaving the site with prisoners inside who were banging on windows and cheering.
Ambulances were also sent to the prison.
'Chronic staff shortfalls'
Shortly after 19:30 BST, about 15 firefighters were seen preparing to go into the prison and local residents said they had heard chanting coming from the building during the afternoon.
Earlier, police officers carrying shields and other equipment had been seen going in.
Following the disturbance, an MoJ statement on Saturday evening said: "The disturbance at HMP Ranby has ended safely. No staff or prisoners injured. Visits tomorrow will take place as normal."
Prison staff are working with Nottinghamshire Police to identify the ringleaders.
A report by HM Inspectorate of Prisons released earlier this week said the prison, near Worksop, was "in crisis".
Four inmates had killed themselves there in less than a year, it said.
Levels of violence were "higher than expected" and getting worse and procedures to deal with self-harm were "poor", it said.
Prisoners once also climbed netting in a bid to be moved to another jail, inspectors found.
But the report said it had faith in a new governor who had taken "decisive action" over the concerns.
Mr Travis blamed Saturday's incident on "chronic staff shortfalls".
He added: "Prisoners are saying, 'We're not dealing with this.' They will react."
MP John Mann, whose Bassetlaw constituency includes the prison, said he had repeatedly warned ministers and prison officials that staff shortages and "dysfunctional" management would lead to "disaster".
"It is a prison where, for quite a time, it's been clear prisoners have been running the prison," he said.
He welcomed the appointment of the new governor but said there had been too many changes at the top and the "only solution" was to recruit more staff.