An end to the long-running dispute between the government and the British Medical Association over the junior doctors contract is now in sight after both sides agreed a new deal.

A new approach to the reward for and acknowledgment of the various demanding working patterns of doctors has been taken, said conciliatory service Acas, balancing the strategic priorities of the government and NHS.

The basic pay rate has been reduced from the 13.5 percent previously on the table to between 10 and 11 percent, while the premium paid for night shifts has been dropped from 50 percent to 37 percent, to maintain the cost neutrality of the new contract.

However, a new weekend allowance has been established to be paid when a doctor is rostered to work more than six weekends per annum, with the supplement increased as the number of weekends worked increases. This allowance will be applied as a percentage of basic pay. Supplements are also paid for being on-call.

The deal also includes more rigorous oversight of the new guardian role to ensure safe working, with junior doctors to get an enhanced role in advising and liaising with the independent guardians who keep an eye on the hours worked.

The agreement forms the basis of the new contract, which will be introduced in stages for different grades and specialties as from October 2016. But it is still subject to a vote by BMA members.

"Junior doctors have always wanted to agree a safe and fair contract, one that recognises and values the contribution junior doctors make to the NHS, addresses the recruitment and retention crisis in parts of the NHS and provides the basis for delivering a world-class health service," said Dr Johann Malawana, BMA junior doctor committee chair.

"I believe that what has been agreed today delivers on these principles, is a good deal for junior doctors and will ensure that they can continue to deliver high-quality care for patients. This represents the best and final way of resolving the dispute and this is what I will be saying to junior doctors in the weeks leading up to the referendum on the new contract."

Also welcoming the agreement, Health Secretary Jeremy Hunt said the deal "represents a definitive step forward for patients, for doctors, and for the NHS as a whole".

"This long running dispute has clearly been an extraordinarily difficult period for the NHS," noted Acas chairman Sir Brendan Barber, who chaired the negotiations. "I am glad that as well as cooperating closely in preparing the communications for the upcoming referendum, all the parties are also strongly committed to tackling together the bigger, wider challenges facing the NHS".

"It is very welcome and promising news that an agreement has been reached by all parties. This has always been the outcome we have hoped for and is in the best interests of everyone, not least our patients," commented Maureen Baker, chair of the Royal College of General Practitioners.