Russia and the United States put aside bitter differences over Syria to strike a deal on Saturday that by destroying President Bashar al-Assad's chemical arsenal may avert U.S. military action against him.
The agreement after three days of talks in Geneva between U.S. Secretary of State John Kerry and Russian Foreign Minister Sergei Lavrov demands that Assad give a full account of his secret stockpile within a week.
International inspectors would rapidly get to work to eliminate all the weapons by the middle of next year - an "ambitious" target, in Kerry's words.
If Syria reneges on a commitment to comply, Washington and Moscow pledged to cooperate at the United Nations to impose penalties - though these remain to be determined and Russia is highly unlikely to support military action, which U.S. President Barack Obama has said must remain an option.
Kerry said Obama retained the right to attack, with or without U.N. backing.
For Assad's opponents, who two weeks ago were expecting U.S. air strikes at any moment in response to a poison gas attack on rebel territory last month, the deal was a big disappointment.
Despite Kerry and Lavrov's assurances that the pact may lay a foundation for broader peace, they said Assad would not comply and that the deal brought an end to their battles no closer.
Warplanes struck rebel-held suburbs of Damascus again on Saturday.
For the world's two greatest military powers, however, the Syrian conflict has chilled relations to levels recalling the Cold War, and Saturday's agreement offers a chance to step back from further confrontation.
For Russian President Vladimir Putin, it brings management of the Syrian crisis back to the United Nations. For Obama, it solves the dilemma created by Congress's reluctance to back military strikes that he was preparing without a U.N. mandate.
Yet many difficulties lie ahead - not least the technical challenge of enforcing a major disarmament involving complex and dangerous materials in the midst of a vicious civil war that has inflamed the entire Middle East.
Kerry told a joint news conference in Geneva: "The implementation of this framework, which will require the vigilance and the investment of the international community, and full accountability of the Assad regime, presents a hard road ahead."
Lavrov said: "It shows that when there is a will ... Russia and the United States can get results on the most important problems including the weapons of mass destruction problem."
"The successful realization of this agreement will have meaning not only from the point of view of the common goal of eliminating all arsenals of chemical weapons, but also to avoid the military scenario that would be catastrophic for this region and international relations on the whole."
In Istanbul, the head of the Syrian rebel Supreme Military Council was dismissive of the deal, however, saying it would not resolve the country's civil war, now in its third year.
General Selim Idris called it a blow to opposition hopes of overthrowing Assad and accused the Syrian president of circumventing any disarmament by already sending chemical weapons to allies in Lebanon and Iraq in recent days.
Qassim Saadeddine, a rebel commander in northern Syria and a spokesman for the Supreme Military Council, told Reuters his forces would not cooperate: "Let Kerry-Lavrov plan go to hell. We reject it and we will not protect the inspectors or let them enter Syria," he said by telephone.
A U.S. official, however, said Washington believed all Syria's chemical weapons remained in areas under the Assad government's control.
Assad, who with backing from his sponsor Iran and its Lebanese Hezbollah allies has fought off first demonstrations demanding democracy and now full-blown rebellion backed by Arab states including Saudi Arabia, has agreed to sign up to an international treaty banning chemical weapons and to submit to controls by the U.N.-backed Organisation for the Prohibition of Chemical Weapons (OPCW).
While submitting to its inspections, he will be deprived of arms which he denies having used.
But he has averted what were likely to be heavy U.S. and French missile strikes and bombing raids that could have weakened his defenses against rebels who control large swathes of Syria, including around the capital Damascus.
Despite the diplomatic breakthrough, chemical weapons only account for around 2 percent of deaths in a civil war in which 100,000 people have been killed since 2011.
On Saturday, Syrian warplanes struck rebel-held suburbs of the capital Damascus and government forces clashed with rebels on the frontlines, according to residents.
The residents and opposition activists, asked about the deal, said that it would not benefit normal Syrians.
"The regime has been killing people for more than two years with all types of weapons. Assad has used chemical weapons six or seven times. The killing will continue. No change will happen. That is it," said an opposition activist in a rebel-held suburb of Damascus who uses the name Tariq al-Dimashqi.
"The most important point is the act of killing, no matter what is the weapon," he said.
Syrian state media broadcast the Kerry and Lavrov news conference live, indicating that Damascus is satisfied with the deal.
Having taken the surprise decision two weeks ago to seek congressional approval for military action to punish Assad for using poison gas, Obama faced a dilemma when lawmakers appeared likely to deny him that - citing unease about helping Islamist militants among the rebels and a wariness of new entanglements in the Middle East after wars in Iraq and Afghanistan.
DEAL OFFERS WAY OUT
The weapons deal proposed by Putin, a former KGB agent intent on restoring some of the influence Moscow lost with the collapse of the Soviet Union, offered a way out.
Russia has protected and armed Assad and has been alarmed at what it sees as Western willingness to bypass the United Nations to impose "regime change" in other states.
Under the terms of the U.S.-Russian agreement - a bilateral document which in itself may represent something of a landmark in the management of global affairs, recalling East-West deals of the Cold War-era - Syria must let the OPCW complete an initial inspection of its chemical weapons sites by November.
Kerry said Assad must produce a "comprehensive listing" of its chemical weapons stockpiles within a week. The goal, he said, was the complete destruction of Syria's chemical weapons in the first half of 2014.
The framework agreement - which one U.S. official described as having been worked out in "hard fought" negotiations with Russia - states that a U.N. Security Council resolution should allow for regular assessments of Syria's compliance and "in the event of non-compliance, including unauthorized transfer, or any use of chemical weapons by anyone in Syria, the UN Security Council should impose measures under Chapter VII of the UN Charter".
Chapter VII can include military force but can be limited to other kinds of sanction. Russia and the United States continue to have different views on what level of punishment to apply.
When Kerry said during the news conference that the text stated that the Council "must" impose measures under Chapter VII, Lavrov interrupted to point out that it says only it "should" impose measures.
"There's no diminution of options," Kerry said, noting Obama's right under U.S. law to order military action, with or without support from Congress or any international body.
Lavrov said of the agreement: "There (is) nothing said about the use of force and not about any automatic sanctions."
Putin has supported Assad's contention that the sarin gas attack on August 21 around Damascus which Washington says killed over 1,400 civilians was the work of rebels trying to provoke Western intervention.
If Russia were "100 percent" sure of a violation, Lavrov said, it would support U.N. moves to "punish the perpetrators".
Senior Kerry aides involved in the talks said that the United States and Russia agreed that Syria has 1,000 metric tons of chemical agents and precursors, including nerve agents such as sarin gas and blister agents such as sulphur mustard.
But the officials, briefing reporters on condition of anonymity, said there was no agreement among the powers on how many chemical weapons-related sites Syria has that must be inspected under the accord.
The U.S. estimate is that Assad's government has at least 45 sites associated with its chemical weapons program, one U.S. official said.
Implementation of the accord, even assuming Syria complies with its terms, will be daunting.
"There are lots and lots of details that still have to be sorted through," a second U.S. official said. To inspect, secure and destroy all of Syria's chemical stockpiles by the first half of 2014 "is daunting to say the least".
That timeline and others in the accord "are targets ... not a deadline" another said.
Syria's chemical weapons are likely to be removed through a combination of destroying them within Syria and shipping some out for destruction elsewhere, the officials said. Russia is one possibility site for destruction, but no final decisions have been made.
Lavrov and Kerry have said they will meet in New York at the United Nations in about two weeks to see if they can push forward a long-delayed plan for an international peace conference to try to negotiate an end to the war.
A drive last year for a political solution, dubbed the "Geneva Plan" and calling for a transitional government, went nowhere as Assad refused to cede power and the opposition insisted he could not be a part of any new political order.
Kerry said Saturday's chemical weapons deal could be "the first concrete step" toward a final settlement. Lavrov said he hoped all parties to the conflict could attend a conference in October, without pre-conditions.