Labour has called on Ministers to “repair the damage” to NHS morale after a new agreement which means the long and bitter dispute over junior doctors’ contracts looks to be over.

After ten days of talks between the British Medical Association and Jeremy Hunt’s representatives a new outline deal has been agreed, which will now be put to a vote of the BMA’s members in the second half of June.

Dr Johann Malawana, BMA junior doctor committee chair, said they had negotiated a “safe and fair contract” after a dispute which goes back to 2012 but which deepened this year with a series of strikes, including the first ever doctors’ walk-out in the history of the NHS in April this year.

The new deal will include:

additional payments for junior doctors depending on the number of weekends worked each year.

extra support for “equality” so doctors who take time out to have children can return to work and catch-up on training and therefore quality for pay rises.

improved flexible pay for specialisms, such as Accident & Emergency and psychiatry, to tackle what the BMA described as a “recruitment and retention crisis”.

Last night shadow Health Secretary said the development had come as a “huge relief to anyone who cares about the NHS”.

“This dispute has gone on for far too long and caused unnecessary distress for both patients and doctors. An imposed contract would have been the wrong solution – and would have risked permanent damage to the NHS – which is why so many medical voices urged the Government to back down and return to talks.

“The priority for Ministers now must be to repair the damage this dispute has done to staff morale and start the process of rebuilding trust with the very people who keep our NHS running.”

Yesterday’s deal was agreed after 10 days of talks at conciliation service Acas. Sir Brendan Barber, chairman of Acas, said both sides had shown “great intensity” in drawing up the deal, which will be voted on between 17 June and 1 July with the result announced on July 6.

Amid signs of backlash from some doctors on social media, however, Malawana said:

“Following intense but constructive talks, we are pleased to have reached agreement. 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.

“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.”