Egypt was holding a full-honours military funeral on Wednesday for the country's former autocratic President Hosni Mubarak, who was for decades the face of stability in the Middle East but who was ousted from power in the 2011 Arab Spring uprising that swept much of the region.
A few dozen Mubarak supporters, clad in black and carrying posters of the former president, had gathered since morning hours at a mosque complex in an eastern New Cairo neighborhood, where Mubarak's body was brought for the funeral service.
Military pallbearers carried Mubarak's casket wrapped in the Egyptian flag into the mosque for prayers. Outside the sprawling mosque, a military phalanx waited to receive his coffin for burial.
The 91-year-old Mubarak died on Tuesday at a Cairo military hospital from heart and kidney complications, according to medical documents obtained by The Associated Press. He was admitted to hospital on January 21 with intestinal obstruction and underwent surgery, after which he was treated in intensive care.
To the outside world, Mubarak the strongman symbolised so much of Egypt's modern history but his rule of nearly 30 years ended after hundreds of thousands of young Egyptians rallied for 18 days of unprecedented street protests in Cairo's Tahrir Square and elsewhere in 2011, forcing him to step down.
Perhaps ironically, Mubarak's funeral service was held at the Tantawi Mosque in eastern Cairo, named for now retired Field Marshal Hussein Tantawi, who headed the military council that ran Egypt following Mubarak's ouster and until the election of Islamist President Mohammed Morsi in 2012.
Egyptian President Abdel Fattah el-Sissi attended the service, which was to be followed later in the day by burial at the cemetery in Heliopolis, an upscale Cairo district that was Mubarak's home for most of his rule and where he lived until his death.
On Tuesday, el-Sissi extended condolences to the former president's family, including his widow Suzanne and two sons, wealthy businessman Alaa and Mubarak's one-time heir apparent Gamal.
In a statement, el-Sissi praised Mubarak's service during the 1973 war with Israel but made no mention of his rule as president of the most populous Arab state. Three days of national mourning were to begin Wednesday, el-Sissi announced.
Pro-government media paid tribute to Mubarak, focusing on his role in the 1973 war with Israel when Mubarak, a pilot by training, commanded Egypt's air force.
"Through his military and political career, Mubarak made undeniable achievements and sacrifices," the state-run al-Aharm newspaper eulogized Mubarak in its editorial Wednesday.
Born in May 1928, Mubarak was vice president on October 6, 1981, when his mentor, President Anwar Sadat, was assassinated by Islamic extremists while reviewing a military parade.
Seated next to Sadat, Mubarak escaped with a minor hand injury as gunmen sprayed the reviewing stand with bullets. Eight days later, the brawny former air force commander was sworn in as president, promising continuity and order.
Mubarak's rule was marked by a close alliance with the US in the fight against Islamic militancy and assisting regional peace efforts. Many older Egyptians, who had long considered him invincible, were stunned by the images of Mubarak on a gurney bed being taken to court for sessions of his trial in Cairo following his ouster.
Mubarak's overthrow plunged Egypt into years of chaos and uncertainty, and set up a power struggle between the military and the Muslim Brotherhood group that he had long outlawed.
Some two-and-a-half years after Mubarak's ouster, el-Sissi led the military overthrow of Egypt's first freely elected president, Morsi, and rolled back freedoms gained in the 2011 uprising.
In June 2012, Mubarak and his security chief were sentenced to life in prison for failing to prevent the killing of some 900 protesters during the 18-day uprising. Both appealed the verdict and a higher court later cleared them in 2014.
The following year, Mubarak and his sons were sentenced to three years in prison on corruption charges during a retrial. The sons were released in 2015 for time served, while Mubarak walked free in 2017.