Egypt's deposed president Mohamed Morsi will be tried on charges of espionage that allegedly aided a "terrorism" campaign involving Hamas and Hezbollah, according to state media.

Morsi, an Islamist who the military toppled in July after a single year of turbulent rule, is already on trial over alleged involvement in the killings of opposition protesters.

Thirty-five other defendants, including former presidential aides and top leaders of Morsi's Muslim Brotherhood movement, would stand trial with him, the official MENA news agency reported.

Prosecutors accuse Morsi of "espionage for foreign organisations abroad to commit terrorist attacks in the country," the agency reported.

The groups, according to the prosecution's investigation, include the Palestinian militant group Hamas and the militant Lebanese Hezbollah movement, MENA reported.

Some of the defendants, including Essam Haddad, Morsi's second in command when president, were also accused of betraying state secrets to the Iranian Revolutionary Guards.

The trial appears to stem from an investigation into prison breaks during a 2011 uprising against strongman Hosni Mubarak, when Morsi and other Islamist prisoners escaped.

Prosecutors have alleged the jailbreaks were carried out by Palestinian and Lebanese militant groups, who had members imprisoned under Mubarak.

The prosecution also alleged Muslim Brotherhood involvement in a surge in attacks on soldiers and police following Morsi's overthrow, centred mostly in the restive Sinai peninsula.

Some of the attacks, which have killed dozens of soldiers and policemen, have been claimed by Al Qaeda inspired groups with no known links to the more moderate Muslim Brotherhood.

Egypt has seen the worst violence in its modern peacetime history since the army unseated Morsi, with hundreds of his supporters killed, along with about 200 soldiers and police.

AFP