The United Nations’ five big powers reached agreement Thursday on a legally binding U.N. Security Council resolution that would require Syria to dismantle its once-secret chemical weapons program or face the threat of unspecified measures, according to senior U.S. and Russian officials.

The deal reached by Britain, France, the United States, Russia and China followed several days of high-level talks in New York. The talks culminated Thursday afternoon with a face-to-face meeting between Secretary of State John F. Kerry and Russian Foreign Minister Sergei Lavrov.

“We did reach agreement with respect to the resolution; we’re now doing final work putting that language together,” Kerry said after the meeting. He expressed hope that “this resolution can now give life hopefully to the removal and destruction of chemical weapons in Syria.”

“I think we reached an understanding with the U.S.,” Lavrov told reporters Thursday night at the United Nations.

The diplomatic moves over Syria’s chemical weapons arsenal came after an Aug. 21 attack near Damascus that a U.N. report found included the use of the nerve agent sarin. The United States says that more than 1,400 civilians, including at least 426 children, died in the strike, which brought Washington to the brink of military intervention before an accord was struck between the United States and Russia.

The draft U.N. resolution based on that accord says that if the Syrian government or the rebels fail to comply with their obligations to rid the country of chemical weapons, the Security Council “will impose measures under Chapter 7 of the U.N. Charter,” which is generally invoked to impose sanctions or approve the use of force. But considering such measures would require the passage of an additional resolution in the Security Council, where Russia is expected to block any proposal for the use of force and resist the imposition of stiff sanctions.

After Thursday’s meeting, a senior administration official said the agreed-on text would be shared later that night with all 15 Security Council members. French and Russian officials said a vote on the resolution was likely Friday evening. Lavrov extended his stay so that he could vote Friday.

The State Department official portrayed the agreement as a “historic and unprecedented” achievement, saying it would place Syria’s chemical weapons under international control for the first time and would mark the first time that the Security Council had declared the use of chemical weapons a threat to international peace and security.

“This is a breakthrough arrived at through hard-fought diplomacy,” the official said. “Equally as important, it makes absolutely clear that failure of the Assad regime to comply will have consequences.”

The resolution, which “strongly condemns” the use of chemical weapons in Syria’s civil war, will establish an international inspection team managed jointly by the United Nations and the Organization for the Prohibition of Chemical Weapons. It requires that Syrian authorities and rebels grant the inspectors immediate and unfettered access to sites and individuals linked to the Syrian program.

Although the draft resolution expresses a “strong conviction that individuals responsible for the use of chemical weapons in the Syrian Arab Republic should be held accountable,” there is no mechanism for prosecuting them. An earlier version of the draft would have authorized prosecution by the International Criminal Court, but it was scrubbed at the insistence of Russia.