Prisons have been thrown into “crisis” as guards walk off the job after a controversial decision.