Caught off guard by the escalating unrest in Egypt, the Obama administration is desperate to avoid any public appearance of taking sides. But Washington's close, longstanding political and military ties to President Hosni Mubarak's regime, plus annual financial support worth about $1.5bn, undermine its claims to neutrality.

While the US favours Egyptian political reform in theory, in practice it props up an authoritarian system for pragmatic reasons of national self-interest. It behaved in much the same way towards Saddam Hussein's regime in the 1980s, when Iraq was at war with Iran. A similar tacit bargain governs relations with Saudi Arabia. That's why, for many Egyptians, the US is part of the problem.

Like tottering tightrope walkers, the balancing act performed by Barack Obama and the secretary of state, Hillary Clinton, has been excruciating to watch. When the protests kicked off, Clinton urged all parties "to exercise restraint". This phrase is useful when politicians are unsure of their ground.

Clinton also struck a lopsided note. "Our assessment is that the Egyptian government is stable and is looking for ways to respond to the legitimate needs and interests of the Egyptian people," she said. Against a backdrop of street battles, beatings-up, teargas, flying bricks, mass detentions and attempts to shut information networks, her words sounded unreal, even foolish.

Mohamed ElBaradei, the establishment rebel who joined the protests, was flabbergasted. "If you would like to know why the United States does not have credibility in the Middle East, that is precisely the answer," he said.

Clinton's emphasis shifted the next day, as if to correct the balance. Mubarak must allow peaceful protests, she said. "I do think it's possible for there to be reforms and that is what we are urging and calling for."

Today she said: "We are deeply concerned about the use of violence by Egyptian police and security forces against protesters. We call on the Egyptian government to do everything in its power to restrain security forces." Still she tried to face both ways: "At the same time, protesters should also refrain from violence and express themselves peacefully."

Obama maintained he had "always" told Mubarak that reform was "absolutely critical". But he also wobbled back in the other direction, saying the Egyptian leader was a good friend. "Egypt's been an ally of ours on a lot of critical issues. Mubarak has been very helpful," Obama said.

Amid the juggling, one fact may be pinned down: the US would not welcome Mubarak's fall and the dislocation a revolution would cause in Egypt and across a chronically unstable region. Gradual reforms of the kind Clinton discussed in a recent speech in Doha about the Arab world, and a competitive presidential election this autumn, would probably be Washington's preferred prescription. As matters stand now, this is the least likely outcome.

Either the regime will suppress the unrest, possibly by ever more brutal means, as happened in Iran in 2009; or the uprising will spiral out of control and the regime will implode, with unpredictable consequences, as in Tunisia. In this latter scenario, one outcome could be a military takeover in the name of national salvation. It has happened before in Egypt, in 1952, when the Free Officers Movement forced King Farouk to abdicate. If it happened again, the US might be expected to endorse it.

That's because, in the final analysis, the US needs a friendly government in Cairo more than it needs a democratic one. Whether the issue is Israel-Palestine, Hamas and Gaza, Lebanon, Iran, security for Gulf oil supplies, Sudan, or the spread of Islamist fundamentalist ideas, Washington wants Egypt, the Arab world's most populous and influential country, in its corner. That's the political and geostrategic bottom line. In this sense, Egypt's demonstrators are not just fighting the regime. They are fighting Washington, too.