A young offenders institute was placed on lockdown after prison officers took action following a spate of violent attacks on staff.
Almost 300 offenders were kept locked in their cells at HMYOI Wetherby in West Yorkshire after five members of staff were assaulted in the past week.
A Prison Service spokesman said the lockdown was a temporary measure.
He added: "An incident at HMYOI Wetherby was resolved at 2.45pm and the establishment is now running as normal."
The Prison Officers Association (POA) said officers had withdrawn to a "place of safety" under health and safety legislation after believing they were not being offered any protection from management.
Steve Gillan, the POA's general secretary, said: "Assaults were happening on staff and there seemed no resolve to it."
He added that one of the main concerns was that offenders were not being risk assessed after being released from the care and separation unit.
Mr Gillan said all of the POA's members had individually decided to take action, and that 288 offenders had been involved.
An HM Inspectorate of Prisons report of an inspection of Wetherby last January found that during the previous six months 212 acts of violence had been recorded compared with 192 at the previous inspection.
Of these, 88 were recorded as assaults on boys, 39 assaults on staff and 85 fights between boys.
The prison had recorded at least 19 incidents in 2014 where staff had received serious injuries, and some incidents involved staff being repeatedly punched and kicked in the face and body.
In one assault, an officer's nose was broken and another had received serious facial injuries. Between October and December 2014, 22 cases of assaults on staff had been referred to the police.
Mr Gillan said that nationally the number of assaults on prison staff had increased by 55% in the last five years, and that the number of serious assaults had risen by 93%, over the same period.
He claimed this was because of budget cuts which had resulted in the loss of 7,000 staff.