Consultants in England have voted in favour of a new NHS contract.
BBC News Online examines the background to the deal and what it means for the NHS.
What has been agreed?
The BMA and the government agreed a new contract for consultants working in the NHS during the summer.
Consultants have now backed the deal in a ballot.
The deal applies only to doctors in England. Separate negotiations are underway in Scotland, Wales and Northern Ireland.
It paves the way for major changes to consultants' pay and working conditions.
What is the background to this deal?
The road to agreement has been long and arduous.
The government and the BMA first entered negotiations on a new contract three years ago.
Both sides struck a deal last year. However, this was rejected by consultants by a margin of two to one in a nationwide ballot last October.
This prompted the BMA to demand fresh talks with the government. However, ministers rejected the offer.
Instead, ministers tried to introduce the contract locally only to find there was little support for this.
Consultants increased the pressure on the government by threatening to take industrial action for the first time in almost 30 years unless talks were re-opened.
The new health secretary John Reid backed down and agreed to fresh talks at the beginning of July.
Agreement between the two sides followed two weeks of intensive and tough talks.
Why did consultants reject the original contract?
Many consultants stood to receive substantial pay rises under the deal. These ranged from 9% to 24% depending on their age and experience.
However, they were flatly opposed to three key parts of the contract.
Many consultants believed the contract would give hospital managers too much say over how they work.
They feared being ordered to operate on patients to meet government targets and said the deal threatened their clinical autonomy.
The contract also proposed to significantly extend the length of their normal working day.
While their working week would be limited to 40 hours, consultants said the contract would have enabled managers to order them to work evenings and weekends as a matter of routine without extra pay.
Most consultants decided that this was too high a price to pay.
In addition, the contract proposed introducing new rules for newly-qualified consultants who wanted to carry out private work.
They would have to offer to work extra hours for the NHS before they were allowed to treat private patients.
This was vehemently opposed by specialist registrars - the next generation of consultants - who also took part in the ballot.
What has been agreed now?
The BMA secured a number of key concessions.
Concerns over managerial control have been "clarified". Consultants' professional and clinical autonomy is no longer under threat.
The new contract will also include a clause saying that consultants will only work evenings and weekends "by agreement".
Evening and weekend sessions will be reduced from 4 hours to 3 hours.
Ministers also backed down on demands that newly-qualified consultants offer to work an additional eight hours a week for the NHS before they carry out private work.
Under the deal, newly-qualified consultants will, like their colleagues, have to offer the NHS one session of four hours per week before doing private practice.
What does the deal mean for the NHS?
A new contract for consultants is central to government plans to modernise the NHS.
It paves the way for consultants to be given extra money to carry out operations at evenings at weekends.
This is key to efforts to reduce the length of time patients wait for operations.
The agreement on private practice means many consultants will in future be working additional hours for the NHS.
This is also expected to help to reduce waiting times and mean that patients are more likely to receive treatment from consultants rather than junior doctors.
Different variations of the contract have also been agreed in Scotland and Wales.
Consultants there are voting on their respective deals this month.
Negotiations are still underway in Northern Ireland.