President Obama said Thursday that he had ordered plans giving the U.S. military "full capacity to act, potentially rapidly," in Libya if the situation there deteriorates.

"I don't want us hamstrung," Obama said. He cited the possibility of a humanitarian crisis, or "a situation in which defenseless civilians were finding themselves trapped and in great danger," or "a stalemate that over time could be bloody" if Libyan leader Moammar Gaddafi continues to resist international demands that he step down.

Gaddafi "has lost legitimacy to lead, and he must leave," the president said.

But in his first public statement on Libya since the outbreak of widespread armed conflict between opposition forces and those loyal to Gaddafi, Obama expressed several notes of caution, stressing that the United States must act only "in consultation . . . with the international community."

"The region will be watching carefully to make sure we're on the right side of history," Obama said at a White House news conference with visiting Mexican President Felipe Calderon. As with Egypt and Tunisia, he said, U.S. interests were best served if the United States was not seen as engineering or imposing a particular outcome.

Having raised the possibility of establishing a no-fly zone over Libya, and after moving warships into the Mediterranean, the United States and its allies appeared Thursday to step back from military intervention, even as opposition forces in Libya continued to call for assistance from foreign air power.

After their unexpected victory Wednesday over well-armed Gaddafi forces in the oil port of Brega, rebel fighters regrouped to bury their dead and to lay plans to carry the fight toward Tripoli, Libya's embattled capital.

Brega was hit Thursday by at least three powerful airstrikes, while rebels clashed with Gaddafi loyalists in the nearby Mediterranean town of Bishra. In Tripoli, there were signs of the government cracking down in an attempt to thwart plans for street protests after Friday prayers.

Activists in Benghazi, the eastern city that serves as the rebel capital, were calling for a million people to protest. On Friday, Gaddafi loyalists erected checkpoints in Tripoli, searching vehicles ahead of what was expected to be the first large anti-government protest there in days, according to the Associated Press. Additionally, the news agency said, Internet access appeared to be cut off in the city, which was unusually quiet ahead of noon prayers.

Some foreign journalists in Tripoli were blocked from leaving their hotel to observe the protests.

"These are exceptional circumstances," Gaddafi spokesman Mussa Ibrahim said, according to the Al Arabiya news agency. "I know you're going to talk about it and twist it the way you want. We are preparing to pay this price of preventing you guys from reporting to avoid turning Tripoli into Baghdad."

Pro-Gaddafi forces launched a renewed assault Friday on the opposition-controlled western city of Zawiya, where a resident said the city had come under attack with shells and machine-gun fire at 11 a.m. local time.