Egypt held a full-honours military funeral on Wednesday for the country's former President Hosni Mubarak, who stepped down amid a popular uprising during the 2011 Arab Spring 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 at a mosque complex in an eastern New Cairo neighbourhood, where Mubarak's body was brought for the funeral service.

The Republican Guard carried Mubarak's coffin wrapped in the Egyptian flag.

The 91-year-old Mubarak died on Tuesday at a Cairo military hospital. 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 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 removal and until the election of President Mohamed Morsi in 2012.

Egyptian President Abdel Fattah el-Sisi 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-Sisi 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-Sisi 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 began on Wednesday.

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 eulogised Mubarak in its editorial on Wednesday.

Born in May 1928, Mubarak was vice president on October 6, 1981, when his mentor, President Anwar Sadat, was assassinated 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 United States in the fight against armed groups 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 after he stepped down.

Mubarak's resignation 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 stepped down, el-Sisi 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.