After five months of negotiations, the government and the British Medical Association have reached a provisional agreement on a new contract for junior doctors.
With junior doctors still needing to vote on this critical aspect of their daily existence, which of the two sides in the dispute can be said to have achieved the best terms?
Firstly, the increase in basic pay in the deal agreed is actually less than previously offered by the government.
The deal ministers had said they were imposing included an average hike in basic pay of 13.5%, while under the terms published on Wednesday that will be reduced to between 10% and 11%.
Pay for night shift is also been reduced from the proposed 50% extra to 37% extra overall.
Both of these agreements will represent savings for the government, but also mean that more money can be distributed in other aspects of the health service.
In particular, doctors working for one of every two weekend will receive an extra 10% on top of their existing salary.
This supplement, which was not included in the original contractual terms, reduces depending on the frequency of weekends work, reducing to 3% extra for one weekend worked out of every seven.
Those available for one weekend in eight or fewer will receive nothing for working Saturday or Sunday.
With doctors also being offered an extra 3% of pay for on-call duties, the British Medical Association believes that unsocial hours are now being properly recognised.
Additionally, doctors that intend to work extra hours as a locum must now give first refusal to the National Health Service.
Rates of pay are being improved by 22% above their normal rate for such conduct, but this will still be a significant saving for the health service in comparison to private agencies.
It is possible that some doctors will be unhappy with this particular restriction, but it would seem to be an essential move for the health service based on widely available economic data.
Junior doctor oversight and involvement in the work of the independent guardian is also being strengthened.
In summary, both sides have made significant compromises, and also made gains over their initial position at the beginning of negotiations.
The deal is ultimately cost-neutral according to reports, indicating that the government has brokered an agreement without putting extra money into the NHS pot.
Whether the terms that have been offered to junior doctors will ultimately be satisfactory remains to be seen.
More than 40,000 junior doctors will be asked to vote on the deal in June.