As Syria veers toward a violent political transition, U.S. officials are hoping to avoid a dangerous vacuum like the one that followed the 2003 toppling of Saddam Hussein in neighboring Iraq and triggered a sectarian civil war.

President Obama is seeking a “managed transition” in Syria with the twin goals of removing President Bashar al-Assad as soon as possible and doing so without the evaporation of the authority of the Syrian state.

The need to safeguard Syria’s chemical-weapons arsenal is one reason why the United States is stressing an orderly transfer in which the opposition works with acceptable elements of the regime and army. The slow-and-steady U.S. approach has angered some militant Sunni opposition leaders, who prefer a decapitation of the regime and a revolutionary transition.

U.S. officials believe that Syria is nearing the tipping point, after a bombing on Wednesday killed Asef Shawkat, Assad’s brother-in-law and one of the regime’s most notorious henchmen, and Dawoud Rajha, the defense minister who was the regime’s most prominent Christian. Fighting had raged Tuesday in the Damascus suburbs, with Syrian tanks and helicopter gunships attacking opposition forces a few miles from downtown.

A U.S. official this week described Syria as a Levantine version of the “Wild West.” Assad’s forces have lost control of many parts of the country: “They cannot hold what they clear,” is how one U.S. official put it, using a buzz phrase of U.S. counterinsurgency doctrine. Syria’s borders have become porous, turning parts of the country into what one observer describes as “Opposition-stan.”

In this chaotic environment, “every intelligence service is gaming it out,” trying to understand the opposition and its leadership and structure, the U.S. official said.

The CIA has been working with the Syrian opposition for several weeks under a non-lethal directive that allows the United States to evaluate groups and assist them with command and control. Scores of Israeli intelligence officers are also operating along Syria’s border, though they are keeping a low profile.

The main transit routes into Syria come from the four points of the compass — Turkey, Iraq, Jordan and Lebanon. The two key axes, in terms of Western assistance, are Turkey and Jordan, both close allies of the United States. The two potential flash points for spreading the sectarian fighting are Lebanon and Iraq, both of which have substantial Shiite militias allied with Iran, which backs Assad.

The most urgent question for CIA officers is how potent are al-Qaeda and its affiliates in the Syrian opposition. The answer seems to be that, while al-Qaeda is a factor, other opposition groups are promising the United States that they will root it out — once they have disposed of the Assad regime. That’s somewhat reassuring, similar to the alliance Gen. David Petraeus formed in Iraq with Sunni militias against al-Qaeda.

Another U.S. message to the Sunni opposition is that it must reach out to the Syrian minorities allied with the regime — Alawites, Christians and Druze — and reassure them that they will have substantial representation in any new post-Assad government. So far, this inter-communal dialogue has gotten more lip service than real action.

In dealing with Syria’s substantial chemical-weapons arsenal, the United States will have two goals: preventing Assad from using them against his own people and preventing extremist members of the opposition from capturing these weapons of mass destruction and gaining operational control of them.

Libya was a test case for controlling chemical weapons amid revolutionary chaos. CIA officers on the ground helped the Libyan opposition secure the main chemical-weapons bunker at Waddan. The CIA also helped connect the new Libyan government with officials from the deposed regime of Col. Moammar Gaddafi who were knowledgeable about the location of the weapons.

The CIA team, working with the Libyans, discovered that in addition to the Waddan stockpile, the regime had imported — perhaps from Iran — chemical-weapons artillery shells that were hidden in Sabha, a town in the central desert that is Gaddafi’s ancestral home. These were moved to Waddan, where they are now awaiting disposal, under international supervision.

The Syrian denouement promises to be much bloodier and more destabilizing than what happened in Libya. It’s a measure of U.S. caution that officials speak not of preventing sectarian violence after Assad is toppled but of keeping it from spinning out of control.

The United States still wants Russian help in managing the Syrian transition, but officials warn that as the situation becomes more violent, the window for effective international cooperation may be closing.