AFTER ten days of talks, the British Medical Association and Jeremy Hunt's Department of Health have finally come to an agreement on a new contract for junior doctors.

About time too.

During the two-day all-out strike last month, in which for the first time in the history of the NHS junior doctors refused even to treat emergency cases, 200 operations and 900 outpatient appointments at York Hospital had to be cancelled.

Consultants were called in to help man the hospital's Accident and Emergency department, so there should have been no risk to lives, in York at least.

But hundreds of York patients who had been waiting weeks for operations that could transform the quality of their lives were badly let down. Nationwide, the disruption to the health service was extraordinary.

We said at the time that it should never have been allowed to come to this - that Mr Hunt and the BMA should have sat around the negotiating table for as long as it took to reach an agreement.

Instead, they indulged in tit-for-tat squabbling, with neither side willing to back down. Confidence in both doctors and the government was undermined. But it was patients who were the real losers.

Now we see that those strikes were, indeed, wholly unnecessary. A compromise agreement has been reached on pay for junior doctors who work more than six weekends a year.

It is still subject to a ballot. But with the BMA's backing, it is to be hoped it will be accepted.

It is just a pity agreement couldn't have been reached earlier. Shame on both sides.