The two states have nursed a bitter political rivalry for decades over regional dominance, personal enmity between leaders, and cold war alliances. In recent years, the regime of Syrian President Bashar al-Assad has repeatedly been accused of turning a blind eye to, or even encouraging, Al Qaeda-linked terror plots in Jordan.

But the countries are also tightly connected: deep social ties bind northern Jordan to southern Syria, and trade between the two countries is critical for Jordan in particular because "they still need the lifeline of trade to Europe through Syria," Mr. Schenker says.

Syria's civil war has brought that trade nearly to a halt and flooded Jordan with more than half a million refugees. It has also created an outlet for Jordan's jihadi movement, which has sent hundreds of fighters across the border.

These jihadis are Jordan's nightmare: local extremists, trained on a foreign battlefield, who may someday bring their expertise back home and wage a terror campaign here. If King Abdullah II cannot guarantee security within the kingdom's borders, he loses the biggest factor in his mandate to rule.

Jordan has no desire to antagonize the Assad regime, but it is also dependent on Western and Gulf countries for aid and trade. Amman has publicly professed neutrality and called for a political solution, while at the same time accepting Syrian refugees and defectors, and quietly cooperating with the United States and Saudi Arabia to arm and train the rebels.

After a joint military exercise in June, the United States left troops, F-16 fighters and Patriot missile batteries deployed in Jordan. The Jordanian government says these are simply a deterrent, and insists that there will be no attack on Syria from its territory.

"They don't want to be in the crosshairs," Schenker says. "They're going to do what they can to stay out of it, and they're hoping that the United States, France or Britain – somebody is going to take the lead."

But going forward, all outcomes are unappealing. If the Syrian regime endures, Assad is unlikely to forget Jordan's support for his overthrow. He could retaliate economically, try to foment anti-government unrest in Jordan, or return to sponsoring terrorism in the kingdom. Plus, the half million Syrian refugees in Jordan risk becoming a permanent presence.

But the fall of the regime could easily lead to a worst-case scenario, in which Jordan shares a long border with a failed state, where different rebel factions and international jihadists continue to fight for dominance.

Should power end up in the hands of Islamist elements among the rebels, like the Al Qaeda-linked Jabhat al-Nusra Front or Islamic State of Iraq and Syria, "Jordan would be a natural target," says Michael Rubin, another former Pentagon Middle East adviser, and a scholar at the American Enterprise Institute.Even a moderate Islamist government next door could embolden the kingdom's Muslim Brotherhood-led domestic opposition, prompting a new attempt to challenge the legitimacy of the regime.