Egypt's presidential runoff election on Saturday and Sunday was supposed to bring some badly needed stability to a country that's been unsettled since the revolution that toppled Hosni Mubarak.
But two days before the election, Egypt's Supreme Constitutional Court plunged the country into a full-blown political crisis by ruling Thursday that parliament must be dissolved because part of it was elected illegally.
The ruling sparked an immediate uproar, particularly among Islamist groups that got about two-thirds of the vote in parliamentary elections back in December and January.
The Supreme Constitutional Court remains packed with judges appointed by Mubarak, and their ruling was widely seen as an attempt to undercut the rising power of the Islamists.
A military council has been effectively ruling Egypt since Mubarak's ouster, and the court decision was seen as part of an ongoing battle between the army and the old guard on one side, and the Islamists on the other.
With broad public support, the Muslim Brotherhood and other Islamist groups can easily organize public opposition to the court ruling. The court decision is sure to be part of mosque sermons at the traditional midday Friday prayers. No one would be surprised if worshipers came out of the mosques and took to the streets on Friday, the day before voting begins.
Meanwhile, the young, secular, urban Egyptians who packed Cairo's Tahrir Square last year in the protests against Mubarak have been pushed to the sidelines in this struggle between Islamists and the old guard.
Some who risked their lives in support of democracy last year have said they don't intend to vote in the presidential runoff — Egypt's first ever competitive election for the top job.
The two candidates offer a very sharp contrast: Mohammed Morsi is an Islamist who represents the Muslim Brotherhood, and Ahmed Shafiq, who was Hosni Mubarak's last prime minister and represents the continuing influence of the old guard and the army.
The court also ruled Thursday that Shafiq, the former prime minister, would be allowed to compete in the presidential election. The Islamists who control parliament recently passed a law saying that top officials in the Mubarak government — like Shafiq — couldn't seek the presidency. The court ruled this was unconstitutional.
"The era of political score settling has ended," Shafiq told supporters. "The constitutional court has confirmed my right to participate in the election."
However, Egyptians upset with the court may be motivated to vote for Morsi, the Muslim Brotherhood candidate. And if Shafiq wins, it could raise questions about the fairness of the polls.
The first round of the presidential race last month featured 13 candidates. Morsi came in first, just ahead of Shafiq, and both received just under a quarter of the overall vote. Because no one received an outright majority, the runoff was required.
Morsi, speaking on Dream-TV, said, "the ruling must be respected."
His position could help settle emotions among Brotherhood supporters.
However, even if the election proceeds smoothly, the absence of a full-fledged parliament is likely to create tensions. For starters, parliament is responsible for producing the country's new constitution, and that could now be delayed.
Update at 5:50 pm ET. "Demonstrators in Tahrir Square":
Young people who demonstrated against Mubarak last year in Cairo's Tahrir Square returned on Thursday night, said NPR's Soraya Sarhaddi Nelson, who was at the scene.
"People are angry," she told All Things Considered, adding that they expressed their view of the court's ruling by chanting "void," and "null."
One member of parliament who represents the Muslim Brotherhood's party in the legislature, Abdul Mawgoud Rageh Dardery, called the court ruling a coup.
But, he added, "I don't think it will be successful. The people of Egypt are very different people than they were a year-and-a-half ago."
(Greg Myre is a foreign editor for NPR.)