CAIRO (AP) — Egypt's former spy chief Omar Suleiman, deposed president Hosni Mubarak's top lieutenant and keeper of secrets, died Thursday, the country's official news agency reported. He was 76.

Suleiman, who served as vice president during Mubarak's final days in office, said little but had a finger in virtually every vital security issue confronting Egypt, was dubbed by the media as the "the black box."

Like Mubarak, he was a fierce enemy of Islamists in Egypt and throughout the region, and a friend to the United States and Israel.

After the revolution, Suleiman disappeared from public view only to return earlier this year as a presidential candidate, sparking fears of a Mubarak regime comeback. He said he ran to try to prevent the Muslim Brotherhood's rise to power, but he was disqualified and in the end an Islamist leader, Mohammed Morsi, won presidency for the first time in Egypt's history.

The official Middle East News Agency said that Suleiman had suffered from lung and heart problems for months and his health condition had sharply deteriorated over the past three weeks.

He died of a heart attack early Thursday while undergoing medical tests at a hospital in Cleveland, MENA reported, citing an unidentified Egyptian diplomat in Washington. His three daughters will accompany the body to be buried in Egypt, the agency said.

An intelligence official said Suleiman would receive a military funeral, a decision that was likely to anger pro-democracy activists who see it as a way to honor a man they despise as the main henchman in Mubarak's repressive regime.

Unlike many ex-regime figures who have been imprisoned or put on trial over a catalogue of corruption charges, Suleiman never faced legal action.

But he was among the top military and security officials who testified in Mubarak's trial. He denied that Mubarak issued direct orders to use violence against protesters but hinted that Mubarak learned about killings when he ordered formation of a committee to investigate the killings and injuries. The ousted leader was convicted of failing to stop the killing of protesters during the uprising and sentenced to life in prison.

A leading member of the Brotherhood said Suleiman's death means the loss of a wealth of information about Mubarak regime.

"He left with big secrets," Essam el-Erian said in a tweet.

Hossam Sweilam, a former general who has known Suleiman since the 1950s when they both joined the military academy, said Suleiman's lack of political ambition helped him keep his job during nearly two decades as the director of the intelligence agency in a paranoid regime.

"There was no intelligence chief who survived that long but Suleiman," he said. Mubarak was known to fear and get rid of politicians who rise in prominence.

Suleiman was appointed vice president on Jan. 29, 2011, at the peak of last year's revolution, a last-gasp attempt by Mubarak to save his political life as hundreds of thousands of Egyptians took to the streets demanding his ouster. But the desperate measures, including talks between Suleiman and the formerly outlawed Muslim Brotherhood, were unable to stave off Mubarak's overthrow.

"He tried to rescue the regime from sinking at the very last stage because he is a man with strong loyalty to the political leadership," Sweilam said.

It was Suleiman who grimly appeared on television on Feb. 11, 2011, to announce that Egypt's leader of nearly three decades was stepping down and handing power to a military council.

This marked the end of the 18-day uprising but opened up a new chapter of tumultuous transition under the rule of the generals.

Suleiman's sudden emergence as a presidential candidate and his disqualification along with the two Islamist front-runners raised suspicion that the bid was orchestrated by the military generals to get rid of Islamists.

In April, Suleiman said he decided to run to prevent the Muslim Brotherhood from coming to power. "If the Brotherhood's candidate wins the presidential election, Egypt will be turned into a religious state. All state institutions will be controlled by the Brotherhood," he said in April.

Suleiman, a tall man who was frequently photographed wearing dark sunglass, rarely spoke to the media. He served as intelligence chief for nearly two decades.

For most of that time he played a behind-the-scenes role as the top official in charge of some of the most important issues facing the Egyptian state, including relations with the U.S., Israel and talks with the Palestinians.

He was widely believed to be the military leadership's preferred successor to Mubarak. This created silent tension between Suleiman and the president's younger son, Gamal, who was seen as being groomed by his father as a rival successor.

In one U.S. diplomatic cable released by WikiLeaks, Suleiman is said to "detest" the idea of Gamal as president. Another cable dated May 2007 reports that a purported personal friend said the spy chief was "deeply personally hurt" when Mubarak failed to make good on what he said was an earlier promise to name him vice president.

The uncertainty over the succession, and the fear that Mubarak was trying to set up a family dynasty through his son, helped spark the uprising.

Sweilam said Suleiman blamed Gamal Mubarak for "giving his father a dishonorable ending," and said Suleiman had warned of an impending revolution after spotting activities of pro-democracy groups.

Declassified CIA files have identified Suleiman as the point man in U.S.-Egyptian cooperation on counterterrorism. He is believed to have played a direct role in the U.S. rendition program, in which suspected terrorists were sent to Egypt and other countries for interrogation, sometimes involving torture.

Suleiman was born in Qena in southern Egypt and graduated from the country's military academy as an infantry officer in 1955. He rose through the ranks and was appointed deputy head of military intelligence in 1987. He became military intelligence chief in 1991 during the Gulf War, when Egyptians fought alongside other Arab forces in the U.S.-led coalition that drove Saddam Hussein's military out of Kuwait.

Suleiman also indirectly saved Mubarak's life when he advised the former president to take an armored Mercedes with him on a state visit to Ethiopia in 1995. Mubarak survived an Islamist ambush of his convoy.

Another senior intelligence official and longtime friend said Suleiman had been in good health and played squash before leaving for medical examination to Germany, the United Arab Emirates and finally the United States. The officials spoke on condition of anonymity because they weren't authorized to speak to the press.

Suleiman is survived by his wife and three daughters.