WASHINGTON -- The unrest engulfing Arab streets and threatening authoritarian governments is complicating U.S. counterterrorism efforts, scrambling the volatile battleground against al Qaeda in Yemen and raising concerns about the durability of Egypt's stance against militants.

U.S. counterterrorism officials need to move quickly to firm up relationships with veteran Mideast intelligence and security services in the aftermath of momentous changes, experts say. Lingering confusion over who will take the reins of power could hamper instant decision-making in the short term.

Over the longer term, will the U.S. be able to work as closely against al Qaeda and other terrorist groups if important allies such as Egyptian President Hosni Mubarak and Yemeni President Ali Abdullah Saleh cede power to Islamist groups such as the Muslim Brotherhood?

"Right now the situation is so fluid it's just about impossible to make any determinations about long-term repercussions," said Roger Cressey, a former counterterrorism deputy in the Clinton and second Bush administrations. "The counterterrorism community has to be cautious about even jumping six months ahead."

Uncertainty about whether the U.S. can depend on Arab allies to join against militants comes amid growing American concerns following a string of failed attacks plotted in Yemen and al Qaeda's home base inside Pakistan. Less reliance on Mideast partners could force the U.S. to strike back on its own there, if a future terrorist attack were to succeed.

"The next time American interests are attacked and there's a return address in Yemen, the U.S. may have to act unilaterally," said Christopher Boucek, an expert with the Washington-based Carnegie Endowment for International Peace.

U.S. counterterrorism officials worry that continuing demonstrations in the Yemeni capital in Sana'a could lead the country's security forces to focus more on protecting the government, giving breathing room to al Qaeda in the Arabian Peninsula, suspected in plots against the U.S. in recent months.

Some street protests have come from pro-democracy elements, Boucek said. Others have been stirred by Islamic fundamentalist and secessionist groups already arrayed against Saleh's government.

In a sign of the mounting alarm about Yemen's role as a terrorist staging area, President Barack Obama told Saleh on the phone this past week about the need for "forceful action" against the al Qaeda affiliate. Obama did praise "the significant reform measures" that Saleh ordered to defuse the protests.

Obama also took the unusual step of publicly chiding Saleh for releasing Abd-Ilah al-Shai, a sympathizer of the al Qaeda group who had been sentenced to five years for his ties with it. Al-Shai had met in 2009 with Anwar al-Awlaki, a fugitive militant cleric who is suspected by American authorities of involvement in the Christmas Day plot that year to bomb a Detroit-bound jet and the October 2010 scheme to send mail bombs on planes from Yemen to the U.S.

Saleh, who has kept power despite battling three separate insurrections, often has to wire-walk between U.S. officials pressing for more leeway to take the battle against al Qaeda and powerful Yemeni tribes suspicious of his dealings with the Americans. Diplomatic cables released this year by WikiLeaks described the gap between Saleh's public posturing and private utterances -- telling top U.S. counterterror adviser John Brennan at one point that he would pretend that a series of U.S. airstrikes had been carried out by Yemeni forces.

"Saleh's good at dancing in the snake pit," said Juan Zarate, a former top Bush administration counterterror official who is now with the Center for Strategic and International Studies. "The unrest he's dealing with now poses some dangers, but he's pretty adept at getting out of trouble."

Egypt once had to contend with its own breed of hardcore Islamic militants. But three decades of brutal repression by the country's security services -- most recently led by new Vice President Omar Suleiman -- largely eliminated them as a threat. The secretive Egyptian Islamic Jihad organization has been headed by al Qaeda's second-in-command, Ayman al-Zawahri since 1991, but Egypt's secret police crushed the group, expelling al-Zawahri and imprisoning its members.

In a classified diplomatic cable written on April 13, 2009, the U.S. ambassador to Egypt, Margaret Scobey, wrote that Cairo's "active opposition to Islamist terrorism and effective intelligence and security services makes Egypt an unattractive safe haven for terror groups, and there is no evidence to suggest there are any active foreign terrorist groups in the country."

During the uprising last week, there were numerous reports that some Islamic Jihad inmates were among hundreds let out during a mass jailbreak. Egyptian authorities said they rounded up many of those who escaped, but it was not clear whether all of them were back in custody. "As long as the military and security apparatus is in control, I still don't see Egyptian militants as a real threat," Cressey said.

The greater concern in Egypt, Zarate said, is tending to the strong ties between American and Egyptian counterterrorism officials that both sides cultivated over the past three decades. "U.S. officials clearly want to shore up their relations with the security services to make sure our counterterrorism relations survive the changes," Zarate said. "They need to be prepared to tailor their relations as the structure changes. If Suleiman takes control, that means there are new top security people we need to deal with."

Some U.S. leaders worry that the fundamentalist Islamic Muslim Brotherhood -- long ago locked out of power in Egypt -- will wield power in a freer, decentralized government that might lead to a weakened stance against al Qaeda and other terror groups.

"My concern is their ties to terror groups and their adherence to (Islamic) Shariah law," Republican Sen. John McCain said last week. "Am I worried about the result that the Muslim Brotherhood might gain power? Yeah, I'm scared to death. But the option of holding off on democracy is not an option."

Counterterrorism experts say the Muslim Brotherhood and al Qaeda are hardly joined at the hip. The groups have been foes for years, quarreling over ideological and tactical differences -- often over the Brotherhood's willingness to work within political systems instead of toppling them violently. "They just don't like each other," Cressey said. "Al Qaeda sees itself as more militant, and they believe the Brotherhood isn't willing to take on the Egyptian security services."

Egypt's toughest counterterrorism challenge ahead may come as U.S. officials are forced to work with a new government that includes the Muslim Brotherhood, seeking common ground against terrorist enemies even if the Islamic faction tries to distance Egypt from its neighbor, Israel. American political leaders have long fused counterterror aims with support for Israel, and contending with an altered Arab world landscape with rising Islamic factions could force hard choices.

"We'll have to struggle with this politically, especially as we go into an election year," said Phillip Mudd, a former CIA and FBI official who was deputy director of the CIA's Counterterrorist Center and now is a senior adviser with Oxford Analytica, a consulting firm. "The tension is between the need to work with these groups to continue the fight against (al Qaeda) and other extreme elements and the possibility that they may go against our wishes when it comes to Israel. Europe is less political and more realistic when it comes to that tension but it may be more of a problem here."

Despite the likely tensions looming, Mudd and some other terrorism experts say the turbulence in Cairo, Sana'a and elsewhere in the Mideast and North Africa raises hopes that al Qaeda's momentum may be overtaken by democratic impulses.

"Al Qaeda sees themselves as revolutionaries," Mudd said. "But the rise of the pro-democracy protests on the Arab street might take the air out of the balloon in terms of their recruiting. It siphons off their youth recruits."