Thousands of Egyptians attended the military funeral on Saturday of ousted strongman Hosni Mubarak's longtime right-hand man Omar Suleiman, who died of a heart attack after an abortive presidential bid.
Suleiman, 76, died in the United States on Thursday while undergoing medical tests.
A fierce opponent of Islamists, who accused him of overseeing ruthless torture during his long tenure as spy chief, Suleiman was appointed vice president during the popular uprising that overthrew Mubarak early last year.
After the uprising, Suleiman, a regional pillar in US-led efforts to combat Islamist militants, kept a low profile but emerged again from the shadows to put his name forward for a presidential election in May to July.
He was disqualified on the grounds that he had failed to present the proper paperwork to stand.
Suleiman's body was flown to Egypt aboard a private jet early Saturday, before the afternoon ceremony at an east Cairo mosque used for military funerals.
Mourners surged forward to touch his casket, shrouded in the military flag, as soldiers placed it on a horse-drawn carriage after the rites finished.
President Mohammed Morsi, the victorious candidate of Suleiman's nemesis the Muslim Brotherhood, sent a representative to the funeral.
Armed forces chief Field Marshal Hussein Tantawi, who took over as interim leader when Mubarak stepped down last year, also attended, as did current spy chief Murad Muawfi.
Suleiman left a controversial legacy, with opponents accusing him of personally supervising the torture of jailed Islamists, some sent to Egypt through the US "extraordinary rendition" programme.
For the revolutionaries who toppled Mubarak, Suleiman's bid for the presidency represented a brazen attempt at reviving the old regime.
The now dissolved Islamist-dominated parliament rushed through legislation to bar him and other former senior Mubarak era officials from the election. A court struck down the law as unconstitutional.
But his supporters, who chanted against Morsi and the Muslim Brotherhood during the funeral, saw him as a bulwark against Islamist control of the country.
Born on July 2, 1935, to a well-off family in the southern city of Qena, Suleiman graduated from Cairo's military academy in 1955.
He received military training in the then Soviet Union, and was for years a highly enigmatic figure both to the world at large and at home in Egypt, where the all-powerful military's activities are shrouded in secrecy.
But he increasingly acquired a public face in recent years, being tipped even before the uprising as a potential successor to Mubarak, himself a former head of the air force.
Under Mubarak, Suleiman served as a negotiating partner for the United States, Israel and the Palestinians, orchestrating a series of short-lived truces between the Middle East foes.