A draft resolution to eliminate Syria's chemical weapons arsenal has been agreed by the five permanent members of the UN Security Council.
Britain's UN ambassador Mark Lyall Grant revealed the UK, France, the US, Russia and China had agreed on a "binding and enforceable draft ... resolution".
The US and Russia had been at odds on how to enforce the resolution and a senior American official described the deal as "historic".
It is understood the text contains no mention of military intervention and Mr Lyall said compromise was crucial.
"The United Kingdom would've liked a direct reference to the international criminal court," he said.
"We would've liked much stronger language on the abuse of human rights, human rights violations by the regime but what this resolution does do is for the first time for many months it brings together in a strong message of unity of the Security Council and for that it was worth making some compromises."
Mr Assad said Syria was prepared for a US attack irrespective of a deal The agreement by the permanent members, whose differences have prevented action on Syria, represents a major breakthrough in addressing a conflict that began two and a half years ago and has killed more than 100,000 people.
The text of the draft resolution was due to be presented to the 10 other members of the Security Council at a meeting on Thursday night - with a vote expected on Friday.
A senior US official said: "This is a breakthrough arrived at through hard-fought diplomacy.
"This is historic and unprecedented because it puts oversight of the Assad regime's compliance under international control."
Russia's Foreign Minister Sergei Lavrov confirmed the accord without giving details of the text.
"We reached an understanding with the United States on a draft resolution," he said.
Meanwhile, Syria's President Bashar al Assad said in an interview with Venezuelan TV that the US may still attack despite an agreement on chemical weapons.
"Maybe we should put that possibility into consideration, in every place of the world (meaning of an outside military attack)," he said.
"We ask ourselves whether there is a possibility of an attack. There may not be one at the moment, but no one knows for sure when that possibility could become a reality. There will always be that possibility and we should not discard it."
The flurry of diplomatic activity is in response to a poison gas attack on August 21 that killed hundreds of civilians in a Damascus suburb, and President Barack Obama's threat of US strikes in retaliation.
US Secretary of State John Kerry subsequently said Mr Assad could avert US military action by turning over "every single bit of his chemical weapons" to international control within a week.
Russia, Syria's most important ally, agreed and Mr Kerry and Mr Lavrov signed an agreement in Geneva on September 13.
Mr Assad's government quickly accepted the broad proposal, but there have been tough negotiations on how its stockpile will be destroyed.
Rescue workers pull out a survivor from underneath the rubble
Firefighters at the scene look through a gap in the collapsed structure
Al Shabaab militants train on the outskirts of Mogadishu in 2008
A campaign is under way in Minneapolis to keep youths away from al Shabaab
Dr Rouhani balked at meeting President Obama in New York
Miraculous tales of survival have emerged since the attack
Smoke rises from the Westgate mall in Nairobi
Kenyan troops stormed the shopping complex
Kenyan security forces outside the Westgate mall
The rubble of a house in Awaran which collapsed during the earthquake
A survivor drinks tea and sits among his remaining possessions
Ms Merkel will have to forge alliances with traditional opponents
Ross Langdon is feared to be among those killed
Kenyan soldiers enter the main gate of the shopping centre
A Kenyan army soldier takes cover behind a wall near the centre
Briton Samantha Lewthwaite: Is she involved
Onlookers watch as the stand-off continues at the Westgate complex 
A plume of black smoke was sent over Sadr City
Hundreds of shoppers were caught up in the attack
Security staff rescued those unable to walk
Armed security staff went from shop to shop looking for the attackers
Police rescued hostages as they searched for the gunmen
Bo Xilai with wife Gu Kailai, who he dismissed as 'crazy'
Bo Guagua, son of Bo Xilai, was accused of enjoying a 'playboy' lifestyle
The sensational trial grabbed the attention of China's media