“There are so many fuses, so little communication, so many risks of something exploding, that there’s little chance of something not going wrong,” said Robert Malley, the former director of Middle East policy in the Obama White House and now vice president for policy at the International Crisis Group. “Everything needs to go right to maintain calm.”

The backdrop to the crisis was a series of steps by Saudi Arabia in recent days to confront its ascendant regional rival, Iran, and the surprise arrests of about 200 Saudis, including 11 princes, in what the government describes as an anti-corruption campaign but which critics see as a consolidation of power by the Saudi crown prince, Mohammed bin Salman.

Lebanon had already been drawn into the crisis in two ways: After a rocket was fired from Yemen at the Saudi capital, Riyadh, on Saturday, Saudi officials accused Hezbollah and Iran of aiding in the attack. And they declared that the attack amounted to a declaration of war by Lebanon, a leap given that the weak Lebanese state does not control Hezbollah.

At the same time, the Lebanese prime minister, Saad Hariri, unexpectedly flew to Riyadh and declared his resignation there on Saturday. Suspicions were growing among officials and diplomats in Beirut on Thursday that he had not only been pressured to do so by Saudi Arabia but was being held there against his will.

Despite the worries, analysts, officials and diplomats said that although they were not privy to the thinking of the Saudi crown prince, it was far-fetched that Saudi Arabia would launch a military action against Lebanon, since it is already overstretched in a war it started two years ago against Iran-aligned Houthi rebels in Yemen.