In February 2011, delirious and near-disbelieving Egyptians in the capital's Tahrir Square danced and sang as they welcomed the fall of a dictator who had maintained iron control of this ancient land for the entire life span of many in the crowd.
But in a place where the past is always vividly present — if only as a glimpse of the pyramids on the dusty desert horizon — what seems consigned to history sometimes rebounds.
On Saturday, Hosni Mubarak, frail but still defiant at 86, permitted himself a small, tight smile of satisfaction as a Cairo judge pronounced invalid, on largely technical grounds, the charges that he had been complicit in the killings of hundreds of demonstrators who had fought to oust him.
With that, Egypt's autocratic ruler of three decades' standing was poised to perhaps soon go free, while those who struggled to topple him — igniting the fires of democratic aspirations across the Arab world — wondered whether their sacrifices had come to naught.
Egypt was not the first of the countries whose long-oppressed people threw in their lot with the so-called Arab Spring — the uprisings that swept a Middle East long beset by hidebound and repressive governments.
But as the most populous Arab country, with its tattered but long-held prestige as the region's intellectual and spiritual center, Egypt seemed to many a beacon that beckoned irresistibly.
In many parts of the region, that onetime flame has yielded only bitter ash. Syria has descended into a savage civil war. Oil-rich Libya is riven by competing militia factions. Tiny Bahrain's Shiite majority, hoping to win consummate rights, still simmers. In strategic Yemen, the Obama administration lends semi-covert military muscle — as in a raid days ago — on behalf of a central government that has managed to maintain only a modicum of control.
And a former military man again rules Egypt.
American pressure to reverse human rights abuses under ex-general and current President Abdel Fattah Sisi — only mild to begin with — has faded almost entirely amid the current push to confront the militants of Islamic State. Egypt is part of the international coalition acting against the Sunni Muslim extremist group that has seized large swaths of Iraq and Syria, although the Sisi government has made it clear that no ground troops will be offered.
For some in Egypt, the throwing out of the charges against Mubarak marked a despairing full circle.
"Thanks to the 'prestigious' court, you have brought life back to our revolution," said a sarcastic Facebook posting by Shady El Ghazaly, an activist in the fight to depose Mubarak.
The judicial system has smiled favorably on Mubarak in his current case, but prominent figures from the Tahrir Square uprising — some celebrated in film and literary depictions of the movement — have found themselves facing harsh penalties, including years in prison. Many of them are appealing heavy penalties for violating a law that in effect bans street protests — ironically, the engine of the uprising against him, which for a time was widely celebrated here.
Anti-Mubarak activists tried to put the best face on Saturday's verdict.
"The price of freedom was paid, and what was before isn't coming back," activist Zyad Elalaimy, a founding member of a youth coalition that took part in the revolt against Mubarak, said in a message posted after Saturday's verdict. "We'll take the lesson and learn from it."
Human rights groups have repeatedly described the current political climate in Egypt as far more repressive than that under Mubarak. Yet there is little whiff of dissent in the air; instead, few dare to question Sisi's authority.
In the court case decided Saturday, charges were dismissed against Mubarak, who had been accused in connection with the killings of hundreds of demonstrators against his rule. Wearing dark glasses and a dark jacket, the former leader listened expressionlessly as the lengthy ruling was read out, occasionally nodding.
At its conclusion, the courtroom erupted in scenes of jubilation, with his aides and lawyers hugging one another.
Mubarak's former interior minister, Habib Adly, and six other top aides were also acquitted Saturday in connection with the protester deaths — about 900 in total, nearly 300 of them listed individually in the court docket. The former president, his two sons, Alaa and Gamal, and an Egyptian tycoon, Hussein Salem, were acquitted on corruption charges stemming from a business deal.
The trial, initially followed avidly by Egyptians who were fascinated by the spectacle of the former leader's dramatic fall from power, drew less and less attention as the procedure dragged on. Saturday's verdict was the culmination of a retrial whose order dated from 2012, when Mubarak was initially sentenced to life in prison.
Separately, the former leader has been convicted of embezzlement and is serving a three-year sentence in a military hospital. But the dismissal of charges against him on Saturday raised the possibility — alluded to by the judge who read out the verdict — that he could soon be set free on the basis of time served, with those charges having been laid in April 2011.
The trials of Mubarak have in many ways served as a political barometer in Egypt. Much of the vilification that was directed at him immediately after his ouster now centers instead on the Muslim Brotherhood and its leader Mohamed Morsi, who took office in June 2012 as Egypt's first democratically elected president but was deposed by the military in July 2013.
The Brotherhood, now the prime target of Sisi's government, is tirelessly depicted by Egyptian authorities and local news outlets as the most dangerous force in Egypt. And with the jailing or exiling of many figures prominent in the 2011 uprising, that revolution is now often painted as a Western conspiracy to control Egypt, with the true "revolution" taking place a year and a half later, when Morsi was removed amid nationwide protests demanding his ouster.
Moreover, having served the Mubarak government is no longer considered a black mark for those in public life. Sisi, elected this year by a landslide after having led the anti-Morsi coup, was military intelligence chief under Mubarak, a former air force commander.
Late Saturday, scattered protests broke out over the court decision, including some in central Cairo — though it was difficult to ascertain if they were in opposition to the verdict, or a continuation of Islamist-spearheaded demonstrations a day earlier. Police drove back demonstrators with water cannons and tear gas.
But weary of upheaval, many reacted with relative indifference to the verdict. Egyptians are much more focused on current unrest, including an Islamist insurgency in the Sinai Peninsula that has killed hundreds of Egyptian troops and led to the displacement of thousands living near the border with the Gaza Strip.
With Egypt's judiciary having fallen into seeming disarray, its courts sentencing dozens or hundreds of suspected Islamists in one fell swoop, some Egyptians said they saw no reason to trust the legal system.
"I can't trust our judiciary any more," said Khaled Fouad, a 28-year-old civil engineer. "We are seeing scores of innocent people locked up, and criminals get released like this?"
A Cairo accountant, 35-year-old Mohamed Abdel Hameed, voiced similar sentiments.
"Egypt is now suffering from corruption, the collapsing economy, the lack of a proper political life, and a million other things," he said. "I knew from Day One of his trial he would never be convicted."
Mubarak had pleaded ill health through much of the proceedings. In 2011, when his trial began, the once all-powerful leader was wheeled in on a gurney, watching the proceedings as he lay prone in the defendants' cage used in Egyptian courtrooms.
In subsequent appearances he was well enough to sit upright and address the court. From the dock, he defended all his past actions as being for the good of Egypt and the Egyptian people.
Some of those distressed by Saturday's verdict sought to take a long view.
"It's a price paid for three years of stumbling where we all made mistakes," said Mostafa Naggar, who once supported the Muslim Brotherhood and later became a member of the parliament elected in 2012. "They want you to despair, but you should pick up hope and hang on to your dream and work for it."
Special correspondent Amro Hassan contributed to this report.