While the popular uprisings of the Arab Spring created new opportunities for U.S. diplomacy, the tumult has also presented the United States with challenges — and worst-case scenarios — that would have once been almost unimaginable.

What if the Palestinians’ quest for recognition of a state at the United Nations, despite U.S. pleas otherwise, lands Israel in the International Criminal Court, fuels deeper resentment of the U.S., or touches off a new convulsion of violence in the West Bank and Gaza?

Or if Egypt, emerging from decades of autocratic rule under President Hosni Mubarak, responds to anti-Israeli sentiments on the street and abrogates the Camp David peace treaty, a bulwark of Arab-Israeli stability for three decades?

“We’re facing an Arab awakening that nobody could have imagined and few predicted just a few years ago,” Secretary of State Hillary Clinton said in a recent interview. “And it’s sweeping aside a lot of the old preconceptions.”

It may also sweep aside, or at least diminish, U.S. influence in the region. The bold vow on Friday by the Palestinian president, Mahmoud Abbas, to seek full membership at the U.N. amounted to a public rebuff of weeks of feverish American diplomacy, which continued through the weekend.

It came on top of a rapid and worrisome deterioration of relations between Egypt and Israel and between Israel and Turkey, the three countries that have been the strongest U.S. allies in the region and the bedrock of U.S. diplomacy for the last three decades.

Diplomacy has never been easy in the Middle East, but the recent events have so roiled the region that the U.S. fears being forced to take sides in diplomatic or, worse, military disputes among its friends. Hypothetical scenarios seem chillingly present. What would happen if Turkey, a NATO ally that the U.S. is bound by treaty to defend, sent warships to escort ships to Gaza in defiance of Israel’s blockade, as Prime Minister Recep Tayyip Erdogan has threatened to do?

Crises like the expulsion of Israel’s ambassador in Turkey, the storming of the Israeli Embassy in Cairo, and protests outside the one in Amman, Jordan, have compounded a sense of urgency and forced the Obama administration to reassess some of this country’s fundamental assumptions, and to do so on the fly.

“The region has come unglued,” said Robert Malley, a senior analyst in Washington for the International Crisis Group. “And all the tools the United States has marshaled in the past are no longer as effective.”

The U.S., as a global power and permanent member of the Security Council, still has significant ability to shape events in the region. This was underscored by the flurry of telephone calls that President Barack Obama, Clinton and Defense Secretary Leon Panetta made to their Egyptian and Israeli counterparts to defuse tensions after the siege of Israeli Embassy in Cairo this month.

At the same time, the toppling of leaders who preserved a stable, if strained, status quo for decades — Mubarak, Moammar Gadhafi of Libya and Zine El Abidine Ben Ali of Tunisia — has unleashed powerful and still unpredictable forces that the U.S. has only begun to grapple with and is likely to be doing so for years.

In the process, diplomats worry, the actions of the U.S. could even nudge the Arab Spring toward radicalism by angering newly enfranchised citizens of democratic nations.

The upheaval in Egypt has even raised the prospect that it might break its Camp David peace treaty with Israel, with Egypt’s prime minister, Essam Sharaf, telling a Turkish television channel last week that the deal was “not a sacred thing and is always open to discussion.”

The administration, especially Clinton, also spent months trying to mediate between Turkey and Israel over the response to the Israeli military operation last year that killed nine passengers aboard a ship trying to deliver aid to Gaza despite an Israeli embargo — only to see both sides harden their views after a U.N. report on the episode became public.

Unflinching support for Israel has, of course, been a constant of U.S. foreign policy for years, often at the cost of political and diplomatic support elsewhere in the region. But the Obama administration has also sought to improve ties with Turkey after the chill that followed the invasion of Iraq in 2003.

Turkey, which aspires to broaden its own influence in the region, has been a crucial if imperfect partner, from the administration’s point of view, in the international response to the fighting in Libya and the diplomatic efforts to isolate Syria’s president, Bashar Assad.

The administration deferred to Turkey’s request last month to delay new sanctions on Assad’s government to give diplomacy another chance.

This month, only days before expelling Israel’s ambassador, Turkey agreed to install a U.S. radar system that is part of a new NATO missile defense system, underscoring its importance to a policy goal of the last two administrations.

Clinton, in the interview, expressed hope that the U.S. would be able to support the democratic aspirations at the heart of the Arab uprisings. She also acknowledged the constraints that the administration faced at home, given the country’s budget crisis and Republican calls in Congress to cut foreign aid, especially to the Palestinians and others seen as hostile to Israel.

“It’s a great opportunity for the United States, but we are constrained by budget and to some extent constrained by political obstacles,” she said. “I’m determined that we’re going to do as much as we can within those constraints to deal with the opportunities that I see from Tunisia to Libya and Egypt and beyond.”