President Obama must be having flashbacks to 2011.

Once again, Egyptian protesters are threatening to overthrow the government in Cairo — just a year since the country's first democratic election — and the White House is on the defensive about whether it hitched its wagon to a flawed leader incapable of recognizing the will of his people.

With each passing day, the parallels between Egyptian President Mohamed Morsi and his ousted predecessor, Hosni Mubarak, are becoming more striking for a White House that had backed the embattled leader in the name of preserving stability in the volatile region.

On the eve of the Egyptian military's deadline for Morsi to reach a deal with anti-government protesters, the Obama administration is facing growing complaints that it put too much faith in a regime that, like others in the Arab Spring, has failed to meet outsized expectations.

Morsi on Tuesday refused to give in, saying on his Twitter account that he "asserts his adherence to constitutional legitimacy and rejects any attempt to breach it and calls on the armed forces to withdraw their ultimatum and rejects any domestic or foreign dictates."

The Egyptian military has devised plans to suspend the country's constitution, disband the Islamist legislature and prop up an interim government if Morsi doesn't reach an agreement with protesters by Wednesday. And with Obama giving Morsi an endorsement, albeit begrudgingly, some analysts said it will be difficult for the president to appear neutral in the clash between the hardline Muslim Brotherhood and a fed-up Egyptian public.

"There is a perception in the Middle East that the United States is in bed with the Muslim Brotherhood; Americans would be astonished to know of this perception," said David Makovsky, director of the Project on the Middle East Peace Process at the Washington Institute for Near East Policy. "It is pervasive and the one way to correct that misperception is for the United States to publicly articulate the liberal ideas that we stand for. We have been pretty silent on these issues since Morsi came to power."

Obama has been careful to avoid picking sides in the conflict, reminding the public that Morsi was democratically elected and that the U.S. condemns violent protests, particularly the reports of sexual assaults against women.

"It's not our job to choose who Egypt's leaders are; we want to make sure all voices are heard," Obama said when forced to weigh in on the rising tide of violence during his weeklong trip to Africa. It's a sentiment the president repeated in a phone call to Morsi, who remains unwilling to compromise.

Such language isn't nearly as rosy as the rhetoric used by the White House as recently as several months ago to describe Morsi. For example, Obama in November praised him for his "personal leadership in negotiating a ceasefire proposal" to halt conflict between Hamas and Israel in the Gaza strip. And Obama repeatedly chose to stay on the sidelines when others accused Morsi of squashing all forms of dissent in a bid to consolidate power.

"There should have been more introspection and soul searching about the fact that we invested so much in secular, liberal groups in Egypt and had very little to show for it," said Christopher Preble, vice president for defense and foreign policy studies at the Cato Institute. "This episode raises very serious questions about the limits of U.S. government democracy-promotion programs."

With the Egyptian economy in the tank and the Morsi regime slow — or unwilling — to change, the biggest problem in Egypt is outside Obama's control: That many see little hope for the reforms promised as a wave of revolutions swept across the Middle East.

"For most Egyptians," Hafez Ghanem, a senior fellow at the Brookings Institution said, "it is not a second revolution, but a continuation of the struggle that started in January 2011."