The agreement ends diplomatic deadlock after a chemical weapons attack blamed on President Bashar al-Assad forces in Damascus on 21 August.

US ambassador to the United Nations Samantha Power said a deal was struck with Russia "legally obligating" Syria to give up its chemical stockpile and the measure would go to the full Security Council later.

Russian Foreign Minister Sergei Lavrov said an "understanding" had been hammered out.

The US had been negotiating on the sidelines of the UN General Assembly with Russia, President Assad's chief ally.

The aim was to craft a measure to demand the destruction of Syria's chemical arsenal in line with a US-Russian deal reached earlier this month that averted US military strikes on Syria in the midst of Syria's civil war.

Western powers on the Security Council backed away from many of their initial demands, diplomats say, in order to secure Russia's approval.

A major sticking point between Russia and Western powers was whether the resolution would be under Chapter 7 of the UN charter.

That covers the council's authority to enforce its decisions with measures such as sanctions or military force.

The compromise draft resolution makes the measure legally binding, but provides for no means of automatic enforcement with sanctions or military force.

Originally, the US, Britain and France had wanted the resolution to state explicitly that it was under Chapter 7.

The only reference to enforcement in the draft is a threat that if Syria fails to comply with the resolution, the council would impose punitive measures under Chapter 7, which would require a second resolution that Russia could veto.

The five permanent members of the deeply-divided United Nations Security Council have agreed on a resolution to eliminate Syria's chemical weapons.

The draft resolution's demands that Syria abandon its chemical stockpile and allow unfettered access to chemical weapons experts are legally binding. But if Syria fails to comply, the council will need to adopt a second resolution to impose measures under Chapter 7 of the UN Charter, which allows for military and non-military actions to promote peace and security.

Nonetheless, after two and a half years of inaction and paralysis, the agreement represents a breakthrough for the security council and rare unity between Russia, which supports Syrian president Bashar Assad's government, and the United States, which backs the opposition.

Russia and the United States jointly introduced the text to the 10 non-permanent council members, supported by the other permanent members Britain, France and China. A vote on the resolution depends on how the full council responds to the draft and on how soon an international group that oversees the global treaty on chemical weapons can adopt a plan for securing and destroying Syria's stockpile.

The Russia, US and British ambassadors said the executive board of the Organisation for the Prohibition of Chemical Weapons may meet today in The Hague, Netherlands, to agree on a document setting out its exact duties. This would enable the security council to possibly vote tonight at the earliest, the ambassadors said.

The UN resolution will include the text of the OPCW's declaration and make it legally binding, so the OPCW must act first.