During his year as president, Egypt's Mohamed Morsi cultivated ties with Islamic radicals, making them a key support for his rule by pardoning dozens of jailed militants, restraining the military from an all-out offensive against jihadis in Sinai and giving their hard-line sheiks a platform to spread their rhetoric.
Now with Morsi ousted and imprisoned, investigators are looking into possibly putting him on trial for links to jihadis, accusing him and his Muslim Brotherhood of being behind a wave of violence by Sinai-based militants in retaliation for the July 3 military coup that removed the Islamists from power, military and security officials say.
Since Morsi's ouster, violence by jihadi groups has escalated into a full-fledged insurgency, with increasing shootings, bombings and al-Qaida-style suicide attacks against troops and police in Sinai. The attacks have spread outside the restive peninsula with bombings and assassinations in the capital, Cairo, and other parts of the country.
The investigation marks a new track of possible prosecution against Morsi, who is already on trial on charges of inciting murder over a December attack by Islamists on protesters and who also is under investigation on possible other charges.
It also represents a new turn in the crackdown that the military-backed government has waged against Morsi's Brotherhood. Security forces have been seeking to crush continuous protests by his Islamist supporters, arresting several thousand and killing hundreds since the coup.
The investigation also comes as authorities are increasingly depicting their crackdown as part of a war against terrorism and overtly blaming the Brotherhood for militant violence. They have used the fight against terrorism to justify tougher measures against all protests, including by secular activists opposed to military power and police abuses. The Brotherhood has denied any connection to violence.
The security and military officials said they believe Morsi is at least "indirectly" linked to the militant violence, saying they are investigating whether he and his Brotherhood had contacts with the groups while in power, cultivating them to bolster their rule against opponents.
The officials, from the military, the Interior Ministry and National Security Agency, who all have first-hand knowledge of the ongoing investigations, spoke on condition of anonymity to discuss the probe.
They said the security agencies are analyzing communications by Morsi — making clear that, as widely suspected, the agencies spied on the president during his year in office. Also among those under investigation are two top presidential aides of Morsi, Essam el-Haddad and Khaled el-Qazaz, who continue to be held in secret military detention, they said.
Suspicions that militants launched their campaign of violence as part of a deal with the Brotherhood have been fueled by statements by leading members of the group.
During Morsi's final days in office, the Brotherhood's most powerful figure, deputy leader Khairat el-Shater, threatened in a meeting with military chief Gen. Abdel-Fattah el-Sissi that removing the president would prompt militants to take up arms against the state, according to el-Sissi's account of the meeting.
Another Brotherhood leader, Mohammed el-Beltagy, told a television interviewer shortly after the coup that militants in Sinai would halt their attacks if Morsi is released and reinstated.
During his final months, Morsi grew closer to radicals. On June 15, he chaired a rally in a Cairo stadium to support Syrian rebels, appearing alongside radical clerics who denounced Shiite Muslims and Morsi's opponents in Egypt as infidels.
But an outright alliance with jihadis to fight back against the coup would be a significant, dangerous move for the Brotherhood, which forswore violence in the 1970s and sought to depict itself as a moderate movement.
Refaat Sayyed Ahmed, head of the Haifa Center for Arab Studies and an expert on Islamic groups, said that while in office, Morsi "encouraged and strengthened" militants and "cashed in on their presence, but we have no proof that he nurtured them as a last-resort card against his opponents."
"Morsi and the Brotherhood are not the only reason behind what is happening in Egypt now," he said.
Morsi's need for allies from the ranks of militant Islamists was pressing. Throughout his presidency, he was unable to win the loyalty of the military, police, the judiciary and the media, and street protests mounted against his rule.
Soon after Morsi came to office on June 30, 2012, northern Sinai — long a refuge for militants — began to attract jihadists from across much of the Arab world, benefiting from a flood of heavy weapons smuggled from Libya into Sinai, which borders Israel and the Gaza Strip.
In August 2012, militants killed 16 soldiers in a Sinai ambush. The army dramatically built up its forces in the peninsula to combat them, but in the months that followed, Morsi several times restrained them from heavy assaults on militants, according to Morsi himself and military officials. Instead, his administration used allies from the hard-line Salafi movement to mediate with jihadis.
The security officials said they are probing whether Morsi and the Brotherhood struck a deal with the militants to step up violence in retaliation for his ouster — a claim frequently echoed by opponents of the group.
"What is happening now, from the attacks in Sinai to the bombings of military intelligence offices and the targeted killings is not random," said Makram Mohammed Ahmed, an expert on
Islamic movements who is a sharp critic of the Brotherhood. "There is a maestro for all that and there is a plan that was put in place well before the execution."
The officials said investigators are also looking into a series of pardons Morsi gave to militants.
The generals who ran Egypt for nearly 17 months after Mubarak's ouster also freed jailed militants, including the brother of al-Qaida leader Ayman al-Zawahri, Mohammed.
The pace of pardons, however, picked up significantly after Morsi took office. Morsi issued nine decrees with pardons starting soon after he was inaugurated, releasing some 2,000 people.
The list includes militants convicted or suspected of taking part in the Islamist insurgency waged against Mubarak's government in the 1980s and 1990s, including ones convicted in an attempted assassination of Mubarak while in Ethiopia. Several pardons also covered key figures from the Brotherhood who had been convicted in absentia.
The head of prisons at the time, Gen. Mohammed Ibrahim Naguib, opposed some of the pardons, which were not run by security agencies for assessment as it is customary, the officials said.
Under Morsi, the pardons were explained as part of his efforts to close one of the darkest chapters of the Mubarak era: Lengthy detention of Islamists without charges or trial. Some of the militants pardoned had served their jail terms but were kept in detention under emergency laws in force during most of Mubarak's 29 years in power. Others were never charged but remained in jail under emergency laws.
A panel of defense and security officials is now reviewing the pardons to determine if some of those released should be re-arrested, the officials said.