The court also jailed two defendants for 15 years each and six for ten years each for forming a Daesh cell in northern Egypt, a judicial source, who preferred to be unnamed because he was unauthorized to speak to the media, said.
Another defendant was acquitted from the charges by the court.
Sunday’s verdicts are still subject to appeal.
Defense lawyer Mosaad al-Hamaki, for his part, described the charges against the defendants as “fabricated”.
“The accused don’t have any political affiliations,” he told Anadolu Agency.
Egypt has been battling an insurgency in the Sinai Peninsula amid militant attacks that mainly targeted security forces.
Egypt has been roiled by turmoil since the military unseated Mohamed Morsi, the country’s first freely elected president, in a 2013 coup.
Since then, hundreds have been sentenced to death on charges of incitement to violence.