Senior hospital doctors in England have voted in favour of a new NHS contract.
The deal applies to consultants in England only
The British Medical Association ballot paves the way for major changes to the way consultants work.
This deal, backed by 60% of doctors, only applies to England. Doctors in the rest of the UK have been offered a slightly different contract.
The result will be a relief to both the BMA and the government. A "no" vote could have seen consultants go on strike for the first time in 30 years.
The vote comes almost one year after consultants rejected a proposed new contract by a margin of two to one.
This time, 60.7% of the 20,814 consultants in England who took part in the ballot voted to accept the deal.
Specialist registrars, many of whom will expect to become consultants within the next three years, also took part. Of the 3,090 who voted, 55.4% said "yes".
Dr Paul Miller, chairman of the BMA's consultants committee, welcomed the result.
"This is a much improved contract to the one offered last year and I am pleased to see that most of my consultant and junior doctor colleagues share this view," he said.
Health Secretary John Reid said: "This is a very good result for the NHS and more importantly for NHS patients."
Under the deal, consultants stand to receive substantial pay rises, ranging from 9% to 24% depending on their age and experience.
NHS trusts will be able to pay them extra money to carry out operations and see patients at evenings and weekends.
Consultants will also have to work additional hours for the NHS before they can carry out private work for the first time.
BMA chairman Mr James Johnson said the contract will improve the working lives of consultants.
"This yes vote is the result of tremendous hard work and negotiation between the BMA and the government," he said.
"This contract will signify improved working conditions for most consultants in England."
Mr Simon Eccles, chairman of the BMA's junior doctors committee, added: "We are delighted that consultants and specialist registrars have agreed the new contract, which will see substantial rewards for senior NHS staff."
Alastair Henderson of the NHS Confederation, which represents health service managers, said: "We have always believed it is a win-win deal for consultants and the NHS.
"It will enable consultants' NHS work to be properly rewarded, allow managers to more effectively plan services, and provide patients with more convenient care."
This latest deal was drawn up after intensive talks between the BMA and the Department of Health during the summer.
Former Health Secretary Alan Milburn had previously refused to re-open negotiations after last year's "no" vote.
However, John Reid decided to sit down with the BMA after he was appointed health secretary.
Shadow Health Secretary Liam Fox welcomed the vote.
"I welcome the stability that this result represents," he said.
"There can now be no excuse for the government's failure to deliver on its health pledges."
Liberal Democrat health spokesman Paul Burstow criticised the time it has taken for both sides to reach a deal.
"The chaos and uncertainty surrounding these negotiations mean that it is difficult to say who the winners are.
"But we know who the losers are: the patients who have suffered the consequences of this drawn-out and bitter battle."
Different variations of the deal have been agreed between the BMA and ministers in Scotland and Wales.
The BMA is currently balloting doctors in Scotland, with results due later this week.
Consultants in Wales will vote on their deal next month, with a result due mid-November.
Negotiations in Northern Ireland have not concluded yet.