The turmoil in Pakistan presents Israel with several nightmare scenarios.
One is that radical Islamists with ties to al Qaeda defeat Musharraf and get their hands on Pakistan's nuclear arsenal.
Another is that the breakdown of law and order enables terrorist groups to acquire enough enriched uranium from Pakistan's extensive stockpiles and manufacture small nuclear devices known as "dirty bombs." Radical Islamists then could smuggle and detonate the bombs anywhere in the world. Israel would be a top target.
The nightmare does not end with the prospect of an "Islamic bomb" being used against the Jewish state.
Pakistan's success in obtaining an atomic arsenal has helped propel nuclear aspirations among other Muslim nations, most notably Iran. As Iran's suspected pursuit of nuclear weapons has intensified, other Arab countries have announced they will be pursuing "more robust" nuclear programs.
A nuclear bomb in an unstable Pakistan or with a rogue regime likely would accelerate these incipient moves toward a multi-nuclear Middle East.
Ironically, Israel's new concerns with Pakistan come after something of a honeymoon period between the two countries. During that time, some observers raised the possibility of diplomatic ties between Israel and the large, influential Muslim state.
In the 1990s, after establishing diplomatic ties with China and India, Israel wooed Pakistan. The Pakistanis were caught between fearing what Muslim radicals might say or do if they established ties with Israel and the desire to use ties to Israel to make inroads in Washington and offset Israel's growing collaboration with India, Pakistan's traditional rival.
Israel-Pakistan détente reached its climax in September 2005 with a public meeting between foreign ministers Silvan Shalom and Khurshid Kasuri in Istanbul following Israel's withdrawal from the Gaza Strip.
But a hoped-for breakthrough failed to materialize, and the Pakistanis made clear that formal ties would come only after the establishment of a Palestinian state.
Some Israeli analysts see in the Pakistani unrest this month a danger to Israel even graver than Iran. The reason is simple: Pakistan already has nuclear weapons.
Pakistan joined the nuclear club in 1998 after carrying out a successful nuclear test that took Western intelligence services by surprise. Since then, Pakistan has produced enough enriched uranium for an estimated 30 to 60 nuclear devices. It also has a parallel plutonium-based nuclear program and, with North Korean help, plans to develop intermediate-range ballistic missiles that could reach Israel.
To date, Israel has not made much of a fuss about the Pakistani bomb.
On the contrary, in the late 1990s, when rumors surfaced of Israeli-U.S. plans to attack Pakistani nuclear facilities, Israel took great pains to reassure the Pakistanis that it had no such designs.
The reason for Israel's relative equanimity was the nature of the Pakistani regime, perceived as stable, pro-Western and responsible. Moreover, Pakistan's strategic reason for wanting a bomb -- as a counterweight to neighboring India's nuclear power -- made sense even if it was undesirable.
But the current unrest points to a potentially very different Pakistan driven by fundamentalist Islamic forces.
Over the past few years, Pakistan has seen a constant influx of Islamist money and ideology, much of it from Saudi Arabia, and Islamist fighters, most of them Taliban crossing over from neighboring Afghanistan to escape U.S. and allied troops. Both have had tremendous influence on the country.
In the latest issue of the Foreign Policy quarterly, 100 American experts named Pakistan as the country "most likely to become the next al-Qaeda stronghold."
That would spell deep trouble for Israel.
Even if the pro-Western regime in Islamabad manages to cling to power, terrorists still may get their hands on Pakistani fissile material necessary to manufacture a dirty bomb.
Pakistan's secret service is thought to be inundated with people with Islamic sympathies, and any of them could collaborate with Islamic terrorists or Arab regimes in the same way that Abdul Qadeer Khan, the so-called father of the Pakistani bomb, illicitly sold nuclear technology to Libya and Iran in exchange for cash.
This danger would be particularly high if Pakistan is in turmoil and nuclear sales are seen as a fast route to easy money.
If moderate Arab countries feel threatened by Iran and/or Pakistan, they too could go down the nuclear road.
A year ago Egypt, Saudi Arabia, the United Arab Emirates, Algeria, Morocco and Tunisia all declared they intended to boost their "peaceful" nuclear programs. Egypt, Algeria and Morocco all have sizable reactors and advanced nuclear energy programs that could become the basis for weaponization.
"Because there would be so many different players, with so many different strategic interests, the risk of miscalculation, of misreading an opponent's moves and, ultimately, of irresponsible use of the bomb would be much higher," nuclear strategist Reuven Pedatzur of the Netanya Academic College said.
To dissuade Arab moderates from going nuclear, Martin Indyk, a former U.S. ambassador to Israel and now director of the Washington-based Brookings Institute's Saban Center for Middle East Policy, has proposed that the United States offer those nations a nuclear umbrella.
Under Indyk's proposal, any nuclear attack on those states would provoke an automatic nuclear response by the United States on their behalf.
Israel's official policy is in favor of a nuclear-free Middle East, but only after peace is achieved with all the Arab countries, the Palestinians and Iran.
Now that policy may depend on another factor: who wins control in Islamabad.