Egypt's deposed president Mohamed Morsi and ex-aides will stand trial for "espionage" that helped a "terrorist" campaign involving the Palestinian militant Hamas and jihadists, the prosecution said Wednesday.
If found guilty, they could face the death penalty.
Morsi, an Islamist toppled by the military in July after a single year of turbulent rule, is already on trial for his alleged involvement in the killings of opposition protesters.
Prosecutors had been investigating his alleged links to Hamas during mass prison breaks in an early 2011 uprising against ousted strongman Hosni Mubarak, when Morsi and other Islamist prisoners escaped.
He and 35 others, including former aides and leaders of his Muslim Brotherhood, now stand accused of "espionage for foreign organisations abroad to commit terrorist attacks in the country", a state prosecution service statement said.
Those groups, according to the prosecution's investigation, included Hamas and the militant Lebanese Hezbollah movement, it said.
Some defendants, including Essam Haddad, Morsi's second in command when president, were also accused of betraying state secrets to Iran's Revolutionary Guards.
The prosecution also alleged Muslim Brotherhood involvement in a surge of 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 members of the security forces, were claimed by Al-Qaeda-inspired groups with no known links to the more moderate Muslim Brotherhood.
But prosecutors say the intention of the attacks was to "bring back the deposed president and to bring Egypt back into the Muslim Brotherhood's grip".
The defendants include the Brotherhood's supreme guide Mohamed Badie and other top Islamists, who are already on trial for allegedly inciting violence.
Signup to our newsletter and follow us on Facebook and Twitter!
In addition to militant attacks in the Sinai, the entire country was gripped by unrest in the months after Morsi's overthrow, with more than 1,000 people, mostly Islamists, killed in street clashes with police.
Thousands of people have been arrested, including much of the Brotherhood leadership.
Morsi himself appeared in court in November at the start of his trial for allegedly inciting the murder of protesters.
He challenged the court's authority from a caged dock and insisted that he was still the president.
He is accused in that trial of involvement in clashes between supporters and opponents outside his palace in December 2012 that killed at least seven people.
But Wednesday's new case against Morsi and his co-defendants is more ambitious, and the culmination of accusations that his Islamist movement was behind violence in Egypt over the past three years.
"These are serious charges, and it seems to me that this is, in Egyptian prosecution style, a classic case of overreach," said Michael Hanna, an Egypt expert and senior fellow at Century Foundation, a US think tank.
"There have probably been a number of contacts between these groups and the Muslim Brotherhood," he said of Hamas and other militant groups cited in the prosecution's investigation.
"But whether there is legal merit to these far-reaching allegations? We haven't seen anything to date that the most serious of these charges are credible," he said.
The interior ministry has blamed the Brotherhood, Hamas and Hezbollah for targeting police stations and prisons during the 18-day uprising against Mubarak.
Mubarak's defence, and that of his interior minister Habib al-Adly, have made similar claims in their trial for the murder of protesters during the revolt.