LONDON — The British government seized control of a major prison from the private firm G4S on Monday after inspectors reported that the facility had fallen into “a state of crisis,” with prisoners using drugs and administering jailhouse justice with near impunity.

The Ministry of Justice announced on Monday that it would take back control of Her Majesty’s Prison Birmingham for an initial six-month period because of “serious concerns over safety, security and decency” within its walls.

The report released by the prisons inspectorate found that staff members were locking themselves in their offices to protect themselves from the prisoners, and detailed “squalid” conditions, with blood, vomit and rat droppings left on the floor to fester.

The chief inspector of prisons, Peter Clarke, described the Birmingham facility as the worst he had ever visited.