Egypt held a full-honors military funeral Wednesday for the country's former autocratic President Hosni Mubarak, who held power for decades before he was ousted in the 2011 Arab Spring uprising that swept much of the region. The funeral, replete with cannon fire and a horse-drawn carriage carrying his coffin, highlighted the wartime achievements of Mubarak. It comes as part of a government effort to make Mubarak's military career his legacy, rather than his time in office. Egypt's current President Abdel Fattah el-Sissi, attended briefly, offering condolences and shaking hands with Mubarak's two sons, Alaa and Gamal, and his wife Suzanne. The country's state television channel, meanwhile, played footage of Mubarak in his younger, pre-office days, and lauded him for his role as a fighter pilot in the country's 1973 war with Israel. As president, Mubarak would later solidify peace with their onetime enemy. Mubarak, who held on to the presidency for more than 30 years, carried out a brutal campaign against Islamist militants, but also allowed for minimal political dissent from his opponents. Under his rule, Egypt's security branches grew into formidable forces with little civilian oversight, known for their human rights violations. And although he oversaw an opening of the country's economy, much of the country's population slid further into poverty during his time in office. Nonetheless, the former president still enjoys a degree popularity among many Egyptians, who have painted him as a paternal figure. At the height of the 2011 uprising, his supporters would sometimes violently clash with pro-democracy protesters. On Wednesday, 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. A horse carriage carrying Mubarak's casket, wrapped in the Egyptian flag, left the mosque after afternoon prayers, to a slow military march. His sons, wealthy businessman Alaa and Mubarak's one-time heir apparent Gamal, stood in the front row with several Mubarak-era ministers. 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 Jan. 21 with intestinal obstruction and underwent surgery, after which he was treated in intensive care. To the outside world, Mubarak the strongman symbolized 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. Mubarak's funeral service was held at a military 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. State media reported that Mubarak's body would be buried later in the day at his family's cemetery in Heliopolis, an upscale Cairo district that was Mubarak's home for most of his rule and where he lived until his death. A crowd of Mubarak supporters gathered in anticipation at the cemetery, holding photos of the deposed president and chanting, “Gamal, tell your father, 100 million say goodbye!” Police officers were out in force, a sign that the government regarded his death as a potential security risk. Under el-Sissi, Mubarak and his family were cleared of wrongdoing but also kept far from the limelight. In a statement Tuesday, 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. Pro-government media also paid tribute to Mubarak, a pilot by training, for his command of 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 Oct. 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. He continued Sadat's legacy of maintaining peace with neighboring Israel. Mubarak's rule was marked by a close alliance with the U.S. 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. ___ Associated Press photojournalist Maya Alleruzzo contributed to this report.