Ben White, from Justice for Health said the judgement meant NHS trusts were now free to negotiate terms and conditions with junior doctors, and could change the contract.

He said the judgement established that: "Mr Hunt is not imposing a contract. He never was."

Mr White said NHS trusts were now "free from the shackles" of Mr Hunt to do as they thought best.

However, the NHS is due to introduce the new national terms from next week.

Chris Hopson, chief executive of NHS Providers, which represents England's hospitals. said“This has been a very difficult time for junior doctors, NHS trusts and the patients who have been affected by the strikes. We hope that today’s ruling will enable the health service to draw a line under the situation and now move towards effectively introducing the new contract for junior doctors.

But he said there was little chance that NHS trusts would make individual decisions to negotiate terms with their staff.

Mr Hopson said: “Junior doctors have raised a number of legitimate concerns that still need to be addressed and NHS trusts will be working hard with their junior doctors to do so. In particular, those issues that are within the remit of the contract, for example the introduction of a new guardian role to each trust, need to be implemented consistently.