As Egyptian President Hosni Mubarak’s regime teeters, Beltway speculation on what could follow shifts almost daily “Only he knows what he’s going to do,” President Barack Obama said of Mubarak on Sunday.

Optimists express cautious hope that a truly democratic successor government, one also friendly to the West, will emerge from the turmoil. Pessimists fear that Egypt in 2011 will instead be distressingly similar to Iran in 1979, with the Muslim Brotherhood pushing aside more secular factions and creating a staunchly Islamic, anti‑U.S. state.

Mubarak’s fate today may indeed only reinforce the lesson of history. Washington has almost always been embarrassed — or worse — by its long-time support of authoritarian rulers. Though there are times when Washington may need to make common cause with unsavory regimes to protect crucial U.S. interests — those occasions should be the exception rather than the rule.

One long-time autocratic client of the United States, Tunisia’s Ben Ali, has already fallen. Now Mubarak is clearly under mounting pressure — though there is an outside chance he may yet survive. Meanwhile, there are signs of growing discontent with pro‑U.S. regimes in places like Yemen and Jordan.

Washington has been down this path before — in many parts of the world. Throughout the Cold War, U.S. leaders embraced numerous autocratic allies and clients who professed to be anti-Soviet. Popular rebellions toppled many of those leaders, often with shocking speed. The aftermaths covered a wide spectrum — ranging from the election of stable, democratic, pro‑U.S. successor governments in South Korea to a cauldron of chaos and civil war in Zaire, now the Democratic Republic of the Congo.

With the possible exception of Zaire, Iran’s Islamic revolution epitomized the worst-case scenario: the emergence of a regime even more repressive than its predecessor and an avowed enemy of the United States.

But outcomes in other countries were better—in several cases, dramatically better. Worries about bitter, anti-American sentiments in South Korea once dictator Chun Doo-hwan relinquished power largely failed to materialize. So, too, did pervasive fears about instability and anti-Americanism in the Philippines after the Reagan administration abandoned the corrupt, autocratic Ferdinand Marcos in favor of Corazon Aquino’s “people power” revolution.

Still, other aftermaths were somewhere in the middle of the spectrum of possibilities. When Nicaragua’s Anastasio Somoza was overthrown, the new regime was not as bad as Iran’s clerical government — in respect to either human rights or U.S. foreign policy interests. But Daniel Ortega’s Sandinista regime was bad enough, aiding other left-wing insurgencies and helping foment turmoil throughout Central America during the 1980s.

These historical experiences should induce caution among both pundits and policymakers about the outcome of the current disorders in Egypt and elsewhere in the Arab world. It is not certain whether besieged autocrats in Egypt and other countries will follow Tunisia’s Ben Ali into forced retirement, much less what the characteristics of successor regimes will be.

U.S. policymakers over the decades have been far too promiscuous about the need for relationships with such leaders. The downside of the cynical strategy is that when long-suffering populations finally cast off their oppressive rulers, they may direct their anger at the United States for having sponsored those regimes.

We have been lucky that hostile responses have not occurred in every nation where a dictatorial U.S. client has been overthrown. And so far in both Egypt and Tunisia, anti-Americanism has not been a prominent feature of the demonstrations.

One hopes that our luck holds. But the latest turbulence should be a reminder to U.S. policymakers to hold even supposedly friendly tyrants at arm’s length rather than enthusiastically embracing them.

Restless populations are watching what we do.