The government has won a High Court action for an injunction to block industrial action by prison staff which was due to begin on Wednesday morning.
Ministers were forced to seek an injunction to halt a walkout scheduled for Wednesday amid a bitter pay dispute and surging levels of violence behind bars.
The Ministry of Justice had argued that the plan amounts to industrial action and is "plainly unlawful".
Prison staff are not allowed to take industrial action, because of the Criminal Justice and Public Order Act 1994 which bans it.
Mr Justice Leggatt ruled that, on the evidence he had heard, the "balance of convenience favours granting of an injunction in these circumstances".