Health Secretary Jeremy Hunt has won a High Court battle with junior doctors over new contracts.
Junior doctors complained Mr Hunt wrongly imposed the contract on NHS employers.
Justice for Health, a group founded by five junior doctors, said Mr Hunt acted beyond the scope of his powers by compelling NHS employers to adopt the new contract.
But Mr Hunt argued the complaint was without substance and should be dismissed, and today a High Court judge agreed the health secretary acted lawfully.
Mr Justice Green concluded Mr Hunt had approved the contract but had not compelled employers to adopt it.
The judge said the decision was sufficiently clear and was not irrational.
The Department of Health welcomed the decision and called on the BMA to "move on" from the dispute.
A spokesman said: "We urge the BMA to remove all threat of further industrial action so we can work constructively with junior doctors to address their wider concerns and better recognise their vital importance to the NHS."
Dr Ellen McCourt, BMA junior doctor committee chair, added: "Today’s result should not be viewed as a win for the government. This ruling will do nothing to address the fact that morale amongst junior doctors is at an all-time low.
"Nor will it quell junior doctors’ concerns about the imminent introduction of a flawed contract they have rejected, or the deep sense of anger and mistrust that has built up towards the government over the last year."
- What is the row between the Government and junior doctors about?
The Government wants to introduce a new contract for doctors working up to consultant level.
Mr Hunt says the new contract will help reduce death rates in NHS hospitals at weekends, a suggestion which has angered junior doctors.
The BMA says junior doctors remain concerned about the impact the contract will have on part-time workers and junior doctors working the most weekends.
- What are the terms of the new deal?
Saturdays and Sundays will attract premium pay if doctors work seven or more weekends in a year, which most are expected to.
Doctors will receive a percentage of their annual salary for working these weekends - ranging from 3% for working one weekend in seven up to 10% if they work one weekend in two.
Any night shift will also result in an enhanced pay rate of 37% for all the hours worked.
There is also an on-call allowance of 8% of basic pay over and above any weekend allowance.
Across the board, there will be an average basic pay increase of between 10% and 11%, down from the 13% originally put forward by the Government.
- How did we get here?
Negotiations over the contract started in 2012 but broke down in 2014, before junior doctors voted to go on strike through a ballot of British Medical Association (BMA) members in 2015.
Industrial action planned for December 2015 was called off but further talks failed and a series of strikes have since taken place, causing thousands of operations and appointments to be cancelled.
A fresh deal was rejected by junior doctors and medical students, resulting in the threat of more strikes, although these have since been called off.
- Could there be more strikes?
The BMA has said it is still opposed to the imposition of the contract and is planning a "range of other actions" to resist it.