U.S. President Barack Obama urged autocratic Middle Eastern allies to look to Egypt's example on Tuesday and encouraged the Iranian people to pursue their quest for democracy.
"You can't maintain power through coercion," Obama said in a stark message to Arab allies of the United States as protests raged in Algeria, Bahrain and Yemen following the ouster of presidents in Egypt and Tunisia.
"At some level, in any society, there has to be consent," Obama told a White House press conference.
Obama also condemned the crackdown in Iran, where lawmakers have demanded the hanging of opposition leaders who called the protests that left two people dead.
Iranian MPs singled out Mir Hossein Mousavi and Mehdi Karroubi, who had called for protests in Tehran on Monday in support of the Arab uprisings that quickly turned into anti-government demonstrations and ended in clashes.
"People should be able to express their opinions and their grievances and seek a more responsive government," Obama said. "What's been different is the Iranian government's response which is to shoot people and beat people and arrest people.
"Real change in these societies is not going to happen because of terrorism. It's not going to happen because you go around killing innocents. It's going to happen because people come together and apply moral force to a situation," Obama said.
"I find it ironic that you've got the Iranian regime pretending to celebrate what happened in Egypt, when in fact they have acted in direct contrast to what happened in Egypt by gunning down and beating people who were trying to express themselves peacefully, “he said.
"We have sent a strong message to our allies in the region saying let's look at Egypt's example, as opposed to Iran's example."
“My hope and expectation is that we are going to continue to see the people of Iran have the courage to be able to express their yearning for greater freedom and a more representative government," he added.
But Obama, who has led international efforts to impose sanctions on Tehran because of its nuclear program, insisted the United States "cannot ultimately dictate what happens inside of Iran."
Obama said Egypt's new military rulers, who took over last week after Egyptian President Hosni Mubarak stepped down amid mass protests, were sending the "right signals" about moving toward democracy after three decades of autocratic rule.
"Egypt's going to require help in building democratic institutions and also in strengthening the economy that's taken a hit as a consequence of what happened," he said. "But so far at least, we're seeing the right signals coming out of Egypt."
Obama also praised the military leadership for reaffirming Egypt's international treaties, including with U.S. ally Israel.
"Obviously there's still a lot of work to be done in Egypt itself. What we've seen so far is positive."
Political unrest, meanwhile, has spread across the Middle East.
In the Yemeni capital Sanaa, pro-regime supporters armed with batons and stones waded into anti-government protesters trying to march on the presidential palace, sparking clashes dispersed by police.
Obama tried to answer critics who suggest his administration was caught flat-footed by the events in Egypt, arguing that he wanted to ensure that the United States did not become the story.
"I think history will end up recording that at every juncture in the situation in Egypt that we were on the right side of history," Obama said
"What we didn't do was pretend that we could dictate the outcome in Egypt because we can't," he said. "So we were very mindful that it was important for this to remain an Egyptian event, that the United States did not become the issue."
But Obama insisted that, if anything, he was actually ahead of the curve.
"If you look at my statements, I started talking about reform two weeks or two and a half weeks before Mr. Mubarak ultimately stepped down, and at each juncture, I think we calibrated it just about right.
"I would suggest that part of the test is that what we ended up seeing was a peaceful transition, relatively little violence, and relatively little, if any, anti-American sentiment or anti-Israel sentiment or anti-Western sentiment."