The Ministry of Justice (MoJ) has won a High Court order forcing prison officers to operate a “full regime” at crisis-hit HMP Lindholme.

Staff at the “volatile” prison near Doncaster operated a “controlled lockdown” on Friday after two prison officers were attacked by inmates the previous evening.

But the MoJ obtained an interim injunction on Friday to restrain what it says is “unlawful industrial action” which has been induced by the prison officers’ union, the POA.

At the High Court on Tuesday, Mr Justice Goss extended the injunction – which requires the POA to instruct its members to return to a full regime at HMP Lindholme – until a full trial of the dispute can be heard.

The POA say they did not instruct staff to take any action, and that officers decided to “restrict the regime in the interests of the safety of themselves and prisoners”.

The union claims that, last Thursday, one prison officer was “punched in the throat” and another was “choked…until he became unconscious” when a prisoner put a towel over his head.

HMP Lindholme, which currently holds about 850 prisoners, was named by the MoJ as one of ten of “the most challenging prisons” in England and Wales.

In August, prisons minister Rory Stewart pledged to resign if he had not managed to reduce the level of drug use and violence at those prisons within a year.

Mr Justice Goss was told by the MoJ’s barrister Daniel Stilitz QC: “There is no doubt that prisons are high-risk areas, they need to be controlled.”

But he added: “It is the governors who should decide what the safest regime is, not the POA or individual officers.”

He said the action represented “the law being taken into the hands of the POA and the prison officers”.

Ben Cooper QC, representing the POA, said that “the injunction sought by the defendant would have the effect, we say, of actually in practice shutting the POA out of any engagement”.

He said that “what this order does is enlist the union’s influence in support of the management position until trial”.

After the hearing, POA general secretary Steve Gillan said: “We will continue to challenge poor managerial decisions that place the health and safety of our members in danger.

“We look forward to the full hearing in due course.”

He added that his union had been subjected to “draconian legislation” which “diminishes our fundamental basic human rights, but the POA will continue to campaign and seek support from politicians to change this legislation”.

A Prison Service spokesman said in a statement before the hearing: “It is for the governor of the prison to decide what regime should be run, and it is not acceptable for others to assume that responsibility.

“That is why we have successfully sought an injunction from the courts requiring the POA to cease their action and comply with the governor’s directions about the regime with immediate effect.”

Before the hearing, shadow justice secretary Richard Burgon said: “The Government won’t solve the prisons crisis by taking prison officers – in fear of their health and safety – to court.

“The Government must work with, not against, our prison officers who are on the front line and facing unprecedented levels of violence.”