Former Egyptian autocrat Hosni Mubarak has been buried in Cairo with a full military funeral, following his death aged 91.

Mubarak’s body was transported from a mosque on the outskirts of the Egyptian capital to the family cemetery on Wednesday amid tight security. His coffin was pulled by horse-drawn carriages alongside a procession led by his sons Gamal and Alaa Mubarak and the current president, Abdel Fatah al-Sisi, flanked by military top brass and leading religious figures.

“A military funeral will be held … for the former president, on the orders of president Abdel Fatah al-Sisi,” Mubarak’s lawyer and longtime spokesman, Farid el-Deeb, told local news outlet Al-Masry Al-Youm. “This is evidence that president Sisi is loyal and wise.”

Egyptian institutions paid tribute to Mubarak, focusing on his record as a war hero during the 1973 war against neighbouring Israel, as the government carefully managed the former dictator’s legacy to avoid any comparisons with Sisi’s rule.

A statement from the Egyptian presidency called Mubarak “one of the leaders and heroes,” of the war against Israel. Egypt’s military also released a statement lauding Mubarak’s record during his time in the Egyptian air force.

Mubarak’s 30-year rule was the longest presidency in Egypt’s history, and until his overthrow in 2011 he was the only ruler that many young Egyptians had ever known. Rising through the ranks of the military, he came to power following the assassination of Anwar Sadat in 1981 and maintained his grip on office through a crackdown on political opposition, routinely running for re-election unopposed and stifling free speech.

His rule appeared unshakeable for many Egyptians, despite the contrast between growing poverty and corruption at home and images of Mubarak enjoying a luxurious lifestyle in his many palaces and villas. The former president courted international powers, receiving annual donations of American military aid as a reward for maintaining a “cold peace” with Israel, and winning tacit acceptance from western leaders, who saw him as a driver of regional peace and stability.

Play Video 3:09 Hosni Mubarak: the rise and fall of the Egyptian dictator – video obituary

Mubarak’s overthrow in 2011 was a political earthquake for Egypt and the wider Middle East, part of a wave of Arab tyrants swept from power by popular protests against corruption and repression. The end of his reign came as many seemingly immovable regimes of the region crumbled in the face of popular dissent, causing Tunisian president Zine El Abidine Ben Ali to flee and resulting in the killing of Libyan strongman Muammar Gaddafi.

But unlike others deposed during 2011, Mubarak remained in the country that rose up against him and stood trial, charged with complicity of the deaths of hundreds during the uprising and on a range of corruption charges. He was initially served a life sentence in 2012 for protester deaths, and later acquitted in 2017, allowing him to walk free. Repeated trials for both him and his sons on a range of corruption and embezzlement charges also eventually resulted in all three being acquitted.

Political science professor Rabab El Mahdi who took part in the 2011 revolt that toppled Mubarak, said his death was “a reminder of the failures of the revolution. It’s the end of a chapter with no closure,” she said. “A lot of history will be buried with him, with no accountability.”

Mubarak’s death comes months after Egyptian security services repressed brief anti-corruption protests against Sisi’s leadership, arresting thousands in order to stifle further dissent. Sisi swept to power in a military coup in 2013, buoyed by a military and security establishment determined to ensure that the popular protests of 2011 never happened again.

Aida Seif El-Dawla, of the Nadeem Centre for Rehabilitation of Victims of Torture and Violence, who has worked with victims of torture under both Sisi and Mubarak, said the latter “left behind someone who will outlive us,” in reference to Sisi.

She said: “I don’t know if it’s nostalgia, but compared with the nightmare we’re living now … during Mubarak it was tough, torture was rampant and people were in prison. But he and his entourage were political, so sooner or later they had to submit a little.” She described life under Sisi’s rule as “revenge for having revolted against Mubarak”.