(Adds quotes, details, context, byline)
By Matt Spetalnick and David Alexander
WASHINGTON, Jan 27 (Reuters) - President Barack Obama called on Egyptian President Hosni Mubarak on Thursday to make "absolutely critical" political reforms, ratcheting up pressure on a key U.S. ally in the face of street protests seeking his ouster.
Weighing in for the first time after three days of Egyptian unrest, Obama was careful to avoid any sign of abandoning Mubarak but made clear his sympathy for demonstrators he said were expressing "pent-up frustrations" after decades of authoritarian rule.
Obama and his aides are performing a delicate balancing act as political upheaval rocks the Middle East, from Egypt to Tunisia to Lebanon to Yemen, catching his administration off-guard and showing the limits of U.S. influence.
While making a point of describing Mubarak as "very helpful on a range of tough issues," Obama sent him a blunt message to heed the demands of anti-government protesters for expanded democratic rights.
"I've always said to him that making sure that they are moving forward on reform -- political reform, economic reform -- is absolutely critical for the long-term well-being of Egypt," Obama said as he answered questions from an online audience on the YouTube website.
Even with its more assertive tone, the Obama administration seemed to be juggling its desire for a return to Middle Eastern stability, its support for democratic principles and its determination to avoid the rise of an anti-U.S. Islamist government in Cairo potentially allied with Iran.
"This isn't a choice between the government and the people of Egypt," White House spokesman Robert Gibbs told reporters. "This is not about taking sides."
Obama urged the government and the protesters to show restraint, saying, "Violence is not the answer in solving these problems in Egypt."
"It is very important that people have mechanisms in order to express legitimate grievances," he said, citing core values like freedom of speech, freedom of expression and access to social networking websites he insisted were as important in the Arab world as in the United States.
Obama spoke on the day that Egyptian police fought protesters in two cities in the eastern part of the country and Nobel Peace Prize winner Mohamed ElBaradei arrived back home to join a major demonstration on Friday.
Security forces shot dead a Bedouin protester in the north of Egypt's Sinai region on Thursday, bringing the death toll to five on the third day of protests inspired by unrest which toppled Tunisia's president earlier this month.
Since taking office two years ago, Obama and his administration have stumbled at times to balance support for moderate, authoritarian Arab states considered crucial to U.S. interests with a push for broader political freedoms.
Egypt is a clear example of that dilemma, given that the United States sees it not only as a linchpin for future Israeli-Palestinian peacemaking but also as a bulwark against Iran's regional clout.
Mubarak has rarely heeded U.S. pressure before over his government's behavior, and it remains to be seen whether tougher language will translate into anything of substance.
U.S. influence at the street level in Egypt and the rest of the Arab world is also minimal. Anti-American sentiment remains high despite Obama's outreach to the Muslim world and his efforts to ease hostility toward Washington generated by his predecessor George W. Bush's decision to invade Iraq in 2003.
The administration is also hemmed in by its desire to avoid the impression of further U.S. interference in the region. Bush's "freedom agenda" was widely reviled in the Arab world.
Most U.S.-based analysts believe Mubarak is likely to weather the storm, if for no other reason than his government and military seem prepared to use whatever force is needed to avoid the fate of ousted Tunisian President Zine al-Abidine Ben Ali in a popular revolt.
But if Mubarak does lose his 30-year grip on power, the greatest U.S. fear would be the rise of a government with strong Islamist ties and the risk of Egypt aligning itself with Iran, a bitter foe of the United States and its ally Israel.
This is widely seen as something the powerful Egyptian military would never permit. Washington has poured billions of dollars of military and other aid into Egypt since it became the first of only two Arab states to make peace with Israel. (Editing by Eric Walsh)