Egypt ordered a retrial of deposed president Hosni Mubarak on Sunday after accepting an appeal against his life sentence, opening up an old wound in the painful transition from decades of authoritarian rule.
Mubarak, 84, was ousted in 2011 after 30 years in power and jailed for life last year over the killing of protesters by security forces trying to quell a mass street revolt.
He was the first Arab ruler to be brought to court by his own people.
A Cairo court granted Mubarak and his former interior minister the appeal as Egypt prepares to mark the second anniversary of the uprising on January 25.
The retrial is likely to stir emotions and could plunge the government of new President Mohamed Mursi into dangerous waters as he tries to restore law and order and a wrecked economy.
Egypt remains volatile as it prepares for a parliamentary election in the next few months. Anxiety over the economy is on the boil after protests, often violent, in late 2012 prompted citizens to snap up hard currency and take out savings.
During Mubarak's 10-month trial, many protesters accused the then ruling generals and officials seen as loyal to the ousted president of protecting him. A retrial may revive calls for a deeper purge of those viewed as holdovers from the old era.
"The court has ruled to accept the appeal filed by the defendants ... and orders a retrial," Judge Ahmed Ali Abdel Rahman said.
Crowds of Mubarak supporters attending the hearing shouted "God is greatest", clapped and whistled as the judge read out the appeal ruling. Groups of joyful supporters were also spotted handing out sweets in central Cairo.
Mubarak's health and fate are debated intensely in Egypt as people try to turn a page on decades of his iron-fist rule and the political turmoil that followed his downfall.
During the original trial, the televised image of their once feared leader prostrate on a hospital gurney in the defendants' iron cage captivated the nation, drawing a line under his era. The retrial is certain to revive difficult memories.
"If Mubarak and his corrupt aides get lighter sentences this will reignite the revolution and there will be more bloodshed," Ahmed Abdel Ghaffour, a 33-year-old engineer in Cairo.
The judge did not clarify the legal basis for the retrial, nor did he say when the hearings were likely to start.
But Mohamed Abdel Razek, one of Mubarak's lawyers, said the retrial would be based on the same evidence used in the original trial and that it would take at least four months to set a date.
"No new evidence will be added to the case," he said, adding that there were countless flaws in the verdict. "(These) resulted in the unfair trial of our client."
After the original trial, many in Egypt were disappointed that Mubarak had not been explicitly convicted of ordering the killing of protesters as well as of what rights groups see as widespread abuses committed under his rule.
Instead, he was found guilty of being complicit in the killings. Around 850 protesters died in the uprising but some rights groups claim the figure is higher.
The opposition, a loose alliance of liberals, secularists and Christians, is now gearing up for demonstrations to coincide with the second anniversary of the uprising on January 25.
The retrial "takes everything and everyone back to square one," said Hassan Nafaa, a professor of political science. "The timing of the verdict is critical with the second anniversary of the revolution coming up on January 25th. Revolutionary youth and opposition will certainly mobilize on this day for justice."
The price of the freedom brought by Mubarak's overthrow is a volatile new politics that often boils over into sporadic street violence.
Attackers threw petrol bombs at tents housing protesters outside the presidential palace in Cairo overnight, firing rubber bullets at security forces.
The exact state of Mubarak's health is not clear, though last year some media reported that he was close to death. He was moved from prison to a military hospital in late December after breaking ribs in a fall.
His legal team had pressed to have him moved to a better-equipped facility, saying he was not receiving proper treatment.
He will remain in custody as he faces new charges from the public funds prosecutor for receiving gifts worth millions of Egyptian pounds from Egypt's state newspaper, Al-Ahram.
Mubarak has not spoken publicly about the events that followed his downfall, saying almost nothing during the trial beyond confirming his presence and denying the charges.
The court also overturned non-guilty verdicts on Mubarak, his two sons and a former aide on corruption charges and ordered a retrial of six aides to former interior minister Habib al-Adli.
Abdel Razek, the lawyer, said the new panel of judges could consider Mubarak's health when issuing a verdict.