Six hundred years of Mideast history are now fully and finally shredding. The political structures established by the Ottoman Turks in the 1500s, especially in Iraq and Syria, have crumbled. The colonial influences and Western ways that once widely pervaded Muslim societies now reside mainly in individuals. American power that succeeded the colonial constructs is largely sapped by wars and diplomatic failures, and by regional upheavals that bewilder and overwhelm even wise policymakers.

The Mideast is being dismembered by fanatics who would enslave women and bind men’s minds to a nightmarish code of conduct, by the deeply embedded corruption and inefficiency of rulers and governments historically favored by Washington, and by the ancient battle between Sunni and Shia Muslims.

There is no brilliant policy that can soon reverse these horrific tides. There is no way to foresee a future that still hides in turmoil. This period of bitter struggle among Muslims will persist for many years, well beyond the capacity of American military, economic, and diplomatic power to influence. Throughout this upheaval, Americans will have concerns about civilian suffering, but overshadowing this humanitarian impulse lies the potent fear that Muslim terrorists will export their jihad to the Western lands they despise almost as much as they do some of their Muslim brethren.

The beginning of wisdom for Americans is to realize that the Arab world is tumbling through an earthquake, and that no mere policy can stop it, let alone shape it. At this stage, Washington can only prepare for the aftermath. The natural American impulse is to search for solutions, for policies that can prevail against these upheavals. But for years to come, Washington will have to lower its sights from solutions to more limited and defensive measures, in effect toward simply halting the jihadi menace. Even then, Americans should expect further jihadi triumphs.

Over time, however, Washington can cultivate new cooperative arrangements with the few stable and similarly inclined or threatened nations—Kurdistan, Israel, Jordan, Turkey and, shockingly, Iran. And if the new Egyptian rulers can be encouraged to stabilize and somewhat democratize their ancient land, Egyptians too would be a key to a better future.

At first and even second glance, this may seem an impossible collection of partners. On its face, Israel surely seems incongruous in this collection, but it could actually fill several important roles. First and foremost, Israel could bolster the Egyptian economy through increased trade and help the government there provide the goods and services demanded by a restive population. It is in Israel’s interest to help stabilize Egypt and make it once again a central anchor in the Arab world. Israel could play a similar role for Jordan.

Israel is also an important supplier of arms and intelligence to the Kurds. While Kurdistan is not a full-fledged state and may never be fully independent, it is for now an important island of stability. Its Peshmerga troops can keep the critical Kirkuk oilfields out of jihadi hands, and should, sooner rather than later, join the general battle against the jihadis across the region.

Of course, Iran is the most surprising potential partner. Political opposition would be fierce in both countries. The mullahs, the Israeli lobbyists, and preachers against the Axis of Evil will go wild. But these American hawks above all should know that Iran’s Shiite leaders feel deeply threatened by the Sunni jihadis next door in Iraq, probably more than the U.S. Iran is also the most stable presence among major Muslim countries. However Americans feel about Tehran’s theocratic regime, the ruling mullahs face no prospect of internal challenges. The mullahs aren’t going anywhere.

The good news is that large numbers of Iranians are pro-American. We have conveniently forgotten the throngs of Iranians who poured into the streets in sympathy with America after 9/11. We’ve also forgotten the Iranian fighters who secured western Afghanistan until 2003. We ignore the comparatively free elections held in Iran, elections that bring the likes of a Hassan Rouhani to the presidency. These factors can make Tehran a reliable partner against the clear and present jihadi danger.

The possible positives could be reinforced if Washington and Tehran manage to concoct a deal to reduce the potential Iranian nuclear threat in exchange for easing economic sanctions. But as much as such a deal would be highly desirable for a strategic realignment, it is not a necessary precondition to establishing a partnership against the jihadis. While the risks of such an attempt should not be discounted, neither should the benefits of a historic change in the strategic landscape. It would be folly for both sides not to try.

It’s hard to figure out how the oil- and gas-rich Gulf states fit into the anti-jihadi campaign. To greater and lesser degrees, they all seem to be more worried about Iran than about the Sunni extremists. Many have secretly supported those extremists. The main thing the U.S. has going for it in this region is that the Gulf state leaders still see Americans as their ultimate protectors against Iran and the jihadis. And as the jihadi threat mounts, this protector role should provide Washington with additional leverage on the peninsula.

Gulf leaders’ fears about U.S.-Iran cooperation leading to more power for Shiite Iran are understandable, but excessive and wrongheaded. They miss the likelihood that when the dust settles some years ahead, it’s bound to be to the Shiites’ disadvantage. Iraqi Shiites, for the first time, had their chance to be the main force in a unified Iraq. They blew it. They’ll be lucky to hold onto the full southern part of the country or be a part of a confederation. Syria’s Alawite Shiites now govern a third or so of their former Syrian domain. They will never again exert the statewide control of the past. If Tehran is smart, its main goal will be to ensure that Iraqi and Syrian Shiites lose no further ground and can protect themselves. Instead of fretting about Iran, the Gulf states might try the novel approach of trying to do something constructive, like help with economic development.

Above all, what has to be kept in mind for the foreseeable future is the earthquake itself. From its epicenter in the Arab heartlands of Iraq and Syria, it is rapidly spreading to Muslim Africa—to Libya, Nigeria, Mali, and Somalia, and perhaps even to Algeria. Egypt is still shaking from the confrontation between the democratically elected Muslim Brotherhood and the new military-controlled government. The ever-elusive peace between Israel and the Palestinians now could be gone for a decade or more, given the failure of recent U.S.-led peace talks and the recent eruptions of violence on the West Bank and in Gaza. There is no political will or support for peace on either side. Perhaps even the indefatigable John Kerry might be discouraged from more futile and dispiriting peace talks.

And finally to the east, Afghanistan and Pakistan pose the usual unsettling threats. The Taliban is far from finished in Afghanistan and could prove as potent as the jihadis in Syria and Iraq once the Americans are gone. Sunni terrorist groups in Pakistan continue to menace Southeast Asia.

The Middle East will never be what it used to be. The familiar good, bad, and ugly, the reliable and the unreliable, are being swallowed up by the earthquake. Western and American interests and safety can no longer be ensured by traditional means. American leaders must try to fashion a new set of workable relationships to cope with this exploding and dangerous Muslim world.