The upheavals that engulfed the Middle East and North Africa in 2011 seemed to blindside the Obama administration and U.S. foreign-policy community. There was no indication at all that American officials anticipated the ouster of Tunisia’s long-tenured pro-U.S. strongman Zine El Abidine Ben Ali. And just days before the size of the anti-government demonstrations in Cairo’s Tahrir Square increased exponentially, Hillary Clinton’s State Department opined that Egypt appeared stable and opposition forces would not topple Hosni Mubarak’s three-decade dictatorship.

As the so-called Arab Spring gained momentum, the administration scrambled to catch up with events and turn the chaos to Washington’s advantage. It has had only limited success in doing so, and developments of the past year have left the U.S. foreign-policy agenda in a tenuous position indeed.The Arab Spring arrived amid fading U.S. missions in Iraq and Afghanistan. By now it is apparent to all except the most enthusiastic imbibers of neoconservative Kool-Aid that the high hopes accompanying the 2003 invasion of Iraq were illusory. Post-Saddam Iraq will not become a pro-Western bastion, much less a model of democratic stability. Instead, under the increasingly autocratic rule of Prime Minister Nouri al-Maliki, Iraq is emerging as at best a quasi-democratic state with a pronounced pro-Iranian orientation. Clearly, that was not what Washington envisioned.

The looming outcome of the mission in Afghanistan is scarcely better. President Obama’s decision to expand the number of troops deployed in that country has changed little: the Taliban remains strong, and the government of President Hamid Karzai is as corrupt and ineffectual as ever. Executing a gradual, reasonably dignified exit appears to be the only attainable U.S. goal.

Despite those setbacks, policy-makers are not about to abandon the effort to maintain an extensive U.S. presence, if not outright hegemony, in the heart of the Muslim world.

Once it became clear that Mubarak’s rule was doomed, the Obama administration moved to salvage as much as possible of U.S. influence in the country. At the 11th hour, Washington urged its long-time client to leave peacefully and called on the Egyptian military to arrange a transition to elections and a new civilian government. The opinion elite in the United States remained divided on the wisdom of that approach. Hawkish right-wingers were vocal in condemning Obama’s repudiation of a U.S. political ally, and they worried—with good reason—that Islamist forces, headed by the Muslim Brotherhood, were poised to gain dominance after Mubarak’s ouster. The results of the first round of elections in early December confirmed that the Brotherhood’s political arm, the Freedom and Justice Party, and the even more hardline Salafis bloc, can rout moderate and secular factions, with Islamists taking better than 60 percent of the votes for the People’s Assembly, the lower house of parliament.

So even as Obama administration officials called on the army to act as midwife to Egyptian democracy, they worked assiduously to strengthen Washington’s own ties to the military hierarchy. Whatever the administration’s motives, the post-Mubarak power structure in Egypt began to look a lot like the old regime, sans Mubarak himself, with the military retaining real power. That may well be the way U.S. leaders like it.

A democratic Egyptian government with significant authority would not likely be pro-U.S., and it most certainly would not be friendly to Israel. But Washington is playing a risky game if it assumes that a friendly autocratic system has staying power, given the extent of public discontent in Egypt—as evidenced by another round of anti-military demonstrations in Tahrir Square on the eve of the December elections.

The Obama administration’s strategy of trying to get in front of the tide of anti-regime populism was more evident in Libya. U.S. leaders quickly condemned the efforts of Libyan dictator Muammar Gaddafi to suppress the growing rebellion against his four-decade rule. It was easier for Washington to take that stance since, in contrast to Mubarak, Gaddafi was never a friend of the United States. Indeed, relations with his regime had been frigid until 2004 and 2005, when the mercurial dictator abandoned his quest for nuclear weapons and renounced support for terrorism. Even then, U.S.-Libyan relations remained tepid.

When it became apparent that rebel forces had a chance to oust Gaddafi, the Obama administration embraced the efforts of France, Britain, and other NATO members to assist the insurgency. Rather than openly advocate using military force for political reasons, though, the United States and its allies spun the fiction that a humanitarian intervention was needed to save the lives of Libyan civilians. With Russia and China willing to hold their noses and go along with that fiction, the UN Security Council approved military action. U.S. and NATO forces promptly launched air strikes and cruise-missile attacks, giving the rebels de facto air superiority.

Proponents see the Libya mission as a model for future U.S. interventions in the Middle East, North Africa, and elsewhere. It confined military action to air and naval support with no “boots on the ground”—the deployment of ground forces that would risk Western casualties and resulting political controversies. This was not really a new strategy; it was a reversion to the model that the Clinton administration used in the Balkan wars of the 1990s, an approach that relied on bombing largely helpless targets from high altitudes.

The Obama administration saw the Libyan mission as a potential model in another way. It was a strategy of “leading from behind”—providing crucial U.S. firepower and logistical support but pushing European allies to take the lead. U.S. officials and outside strategists dedicated to preserving U.S. dominance in the Arab world saw that approach as having the potential to achieve policy results without incurring the high costs and bitter domestic divisions that another massive Iraq-style intervention would inevitably generate.

As 2011 drew to a close, the administration was also taking a harder line toward the government of Syrian President Bashar Assad, and a Libyan-style military venture has become more than a remote possibility. As in the intervention against Gaddafi, advocates of using force to take out Assad cite the very real brutality of his crackdown on anti-regime demonstrators. Indeed, that line of argument has more validity than it did in the case of Libya. By December, Assad’s security forces had killed an estimated 4,000 people since the uprising began, compared to just a few hundred deaths at the time of NATO’s intervention against Gaddafi.

Not surprisingly, the United States has taken a far more pro-active stance against dictatorial regimes that were hostile to Washington than those considered friends—however corrupt and authoritarian those friends might be. American condemnation of the dictator of Yemen, Ali Abdullah Saleh, was noticeably milder than the denunciations of Gaddafi, Assad, and the clerical regime in Iran. And Washington’s criticism of the Saudi-backed monarchy in Bahrain barely reached the level of perfunctory.

Reasons for the double standard were not hard to find. The Saleh government has been most helpful in assisting U.S. efforts to root out al-Qaeda cells in Yemen. And Bahrain is the homeport of the U.S. Fifth Fleet, which is the linchpin of the American naval presence in the Persian Gulf. American leaders are willing to risk charges of inconsistency—and even rank hypocrisy—to continue backing regimes that provide such crucial support for U.S. policy in the region, even if those regimes are both brutal and corrupt.

How Muslim populations react to Washington’s double standard, though, is another matter. De facto U.S. support of Saleh, for example, did not save his regime—he has conceded to step down in February. And the Obama administration’s conveniently selective stance regarding democracy and human rights in Muslim countries certainly has done nothing to refurbish America’s tattered image with aggrieved populations.

 •   •   •

The tumultuous developments of 2011 had one common feature: they portend a far more precarious military and political situation for the United States throughout the swath of territory from Morocco to the Pakistan-India border. American policy-makers are working frantically to prevent a series of setbacks from becoming a geopolitical rout.

One objective is to preserve access to key countries—and key bases—for the U.S. military. Once it became apparent, for example, that there would be no long-term “residual” deployment of 20,000 to 30,000 U.S. troops in Iraq after 2011, Washington explored ways to beef up its military presence in Kuwait. The theory is that troops, planes, and ships located in that kingdom could be used to police hot spots elsewhere in the Middle East and Persian Gulf. That same objective has made U.S. officials even more desperate to retain the U.S. naval base in Bahrain.

But it is a fragile strategy. At the moment, the Kuwaiti ruling family seems secure in power, but then, so did other Arab regimes that quickly melted down during the Arab Spring. Bahrain is an even frailer candidate for a U.S. military bastion. Despite massive support from Riyadh, the repressive Sunni-dominated regime is ripe for overthrow by an Iranian-backed Shi’ite revolution. That could happen quite suddenly and put the future of the headquarters of the U.S. Fifth Fleet in doubt.

The uncertainty of continued military access to Kuwait, Bahrain, and other Gulf states means that Washington is coming to rely more and more on Saudi Arabia as its principal political and military ally in the Islamic world—especially as the United States adopts a more aggressive policy toward Iran, since there is a diminishing roster of regional partners for such a venture. Iraq is not going to be a reliable U.S. ally; indeed, the Shi’ite-led government in Baghdad would more likely tilt toward its co-religionists in Tehran in a U.S.-Iran fight. The turmoil in Egypt largely removes that option. And the chilling of relations between Washington and its NATO ally Turkey confirms that the U.S. can no longer count on that country to help implement its policy objectives in the Middle East.

These dynamics mean that Washington’s military leverage in the region is less secure than it has been in many decades. And its political-diplomatic position is in even greater jeopardy. The landslide triumph of Islamist factions in Egypt’s parliamentary elections is a sign that the Arab Spring may produce a host of unfriendly regimes. The earlier balloting in Tunisia also saw an Islamist party, albeit a somewhat moderate one, become the leading faction in that country’s parliament. And one of the first actions of the National Transitional Council in Libya following Gaddafi’s ouster was to declare Sharia law.

For decades, the foundation of Washington’s policy throughout North Africa, the Middle East, and Southwest Asia relied on partnerships with friendly secular autocrats. That foundation is now crumbling, as one by one America’s dubious security partners lose their grip on power. In response, U.S. leaders are pursuing a two-track strategy. One track is to try to prop up tottering regimes in key countries. The effort to preserve the Egyptian military’s dominant role in that country and the U.S.-Saudi partnership to shore up Bahrain’s royal family are examples of this. The other track is to portray the United States as supportive of the aspirations of downtrodden populations as symbolized by the Arab Spring. We see that approach in evidence with respect to U.S. policy in Libya and the ongoing effort to undermine the Assad regime.

Neither is working well. The friendly autocracies are finding it increasingly difficult to hold onto power, regardless of U.S. support. Indeed, Washington’s great nightmare is that the most crucial remaining authoritarian partner, the Saudi royal family, might lose its grip. While that does not appear to be an immediate danger, it is a scenario that cannot be ruled out. The emergence of an anti-American regime in Riyadh would put all of Washington’s major policy goals—protecting the oil flow, containing and undermining Iran, and supporting Israel’s status and power—in dire straits.

Although the old foundation of partnership with autocrats is not doing well, the newer approach of backing reform isn’t faring any better. Given its record, the United States has little credibility with Muslim populations as a champion of freedom and democracy. Indeed, U.S. policy-makers seem to assume that those populations have a collective case of amnesia about Washington’s support for corrupt tyrants throughout the decades since World War II.

American foreign policy is adrift in a sea of increasingly hostile countries in North Africa, the Middle East, and Southwest Asia. The eastern anchor of American strategy, Pakistan, has already become such an unreliable partner in the war against radical Islamists in neighboring Afghanistan that some U.S. policy experts now regard Islamabad as an adversary rather than an ally. Afghanistan itself is a corrupt, ineptly governed mess with few prospects for stability—much less pro-Western stability—in the foreseeable future.

Farther west, the United States confronts the growing power of Iran; a new Iraq that, while nominally democratic, is also under mounting Iranian influence; and a Saudi Arabia that feels under siege and has little confidence in Washington’s staying power. The United States can no longer count on Turkey. Under the Justice and Development Party of Prime Minister Erdogan, Ankara shows more pronounced Islamist tendencies and pursues an increasingly independent foreign policy.

Egypt, an ally for more than three decades, is now a less reliable partner—even if the military manages to keep the Muslim Brotherhood and the Salafis bloc from gaining decisive power. Libya seems more likely to be a fractious, pro-Islamist state than a secular democratic friend, despite NATO’s sizable military and economic investment.

All this suggests that the era of U.S. hegemony in that part of the world is entering its twilight. But instead of adjusting to that change gracefully and adopting a lower political and military profile, the U.S. policy elite is inclined to dig in its heels and try to preserve a rapidly eroding position. That strategy is unlikely to work, and the oversized U.S. presence—especially the abrasive military presence—may well contribute to even greater turmoil and anti-American sentiment in the coming years.

Ted Galen Carpenter, a senior fellow at the Cato Institute, is the author of eight books and numerous articles and policy studies on international issues.