Unrest in Cairo threatens to undermine America's decades-long partnership with Egypt's intelligence services, which have backed the US counter-terrorism campaign to the hilt.
For years, Egypt has shared sensitive intelligence with the United States -- and long before the attacks of September 11, 2001, Cairo's spies helped the CIA track Islamic extremists and Al-Qaeda operatives, experts and officials said.
"A lot is at stake," Michael Desch, a professor of political science at Notre Dame, told AFP. "They have been very helpful in terms of the war on terror."
Washington has counted on Egypt to give a green light to the use of its air space or territory for intelligence operations, while Cairo had no objections to accepting terror suspects snatched by the Americans and secretly handed over for harsh interrogations.
But that cozy relationship could be lost if days of mass street demonstrations end President Hosni Mubarak's 30-year rule.
"The issue that the current unrest raises is would a government, aside from the Mubarak government, be as cooperative," Desch said. "And I think that the answer is probably no."
If political leaders had to answer to public opinion, the Egyptian intelligence service might be less willing to back some US initiatives, including the covert transfers of terror suspects or projects that benefit Israel.
Egyptian intelligence has been led since 1993 by Omar Suleiman, valued as a steadfast partner by the CIA, who now finds himself in a pivotal political role as Mubarak's first ever vice president.
Until now, Sulieman's spy service was ready to perform "the dirty work that we're not inclined to do," Desch said. "It will be much more arms-length under a post-Mubarak regime."
US strategists worry that a less aggressive approach could be exploited by militants in a country that has produced prominent Islamist extremists, including Al-Qaeda's number two Ayman al-Zawahiri, and the chief hijacker on 9/11, Mohammad Atta.
Washington soon could be faced with a country charting a more independent course similar to that of Turkey, a longstanding ally no longer willing to always tow the US line, according to Desch and other analysts.
In 2003, Washington's plans for the invasion of Iraq suffered an embarrassing setback when Turkey's parliament voted down a US request to use the country's territory for operations in northern Iraq.
"As these countries (in the region) become more democratic, we may find some of the decisions that the electorate makes may be part of the democratic process, but may not necessarily be in the US national security interest," said Rick Nelson, a senior fellow at the Center for Strategic and International Studies who worked in US counter-terrorism programs.
Nelson, however, said years of close cooperation and training meant that Cairo's spy services had forged bonds with their US counterparts that would carry on despite changes in political leadership.
There was a "longstanding network of friends of the United States that will continue through no matter what the government in place is," he said.
"Those relationships are something that are not going to atrophy over any short period of time."
Even without the Mubarak regime, Egypt's core interests would not necessarily change and any government would still see security ties with the United States as offering advantages, said Michael O'Hanlon of the Brookings Institution.
"The two countries share an interest in repelling and defeating groups like Al-Qaeda, and containing Islamist extremists more generally," O'Hanlon said.
"But of course, all of this assumes political moderation at the top," he added.
US officials acknowledge the intelligence agencies face an uncertain moment amid fast-moving events on Cairo's streets.
"Egypt's solid commitment to counterterrorism has been key to the fight against Al-Qaeda," a US official said.
"We expect this relationship will continue, but obviously we?re watching developments to see if changes in the government have an impact," said the official, who spoke on condition of anonymity.
While US officials worry about maintaining counter-terrorism efforts with Cairo, the wave of grass-roots protests may have dealt a damaging propaganda blow to Al-Qaeda, which had long argued for violence to oust Mubarak and other old guard Arab leaders.
"One of the things I think that is troubling for Al-Qaeda with this is that the Egyptian people were able to achieve what Al-Qaeda couldn't," Nelson said.