Egypt sentences officer-turned-militant and 36 others to death
The sentences have been referred to Egypt's top religious authority for a non-binding opinion on whether they can be executed on terrorism-related charges.
Customarily, all death sentences in Egypt are sent to the Grand Mufti for his office's advice on whether the ruling is consistent with religious law.
The Cairo Criminal Court said the defendants were charged with belonging to a local IS affiliate spearheading an insurgency in Egypt's Sinai Peninsula.
For years, Egypt has been fighting insurgents in the vast Western Desert and restive north Sinai, where Human Rights Watch has accused the military of committing war crimes.
The men are among more than 200 defendants accused of carrying out more than 50 militant attacks that included killing high-ranking police officers and bombings that targeted the Egyptian capital's police headquarters.
Ashmawy - a former special forces officer-turned-insurgent - was captured in the eastern Libyan city of Derna in 2018 and transferred to Egyptian authorities by forces loyal to rogue Libyan General Khalifa Haftar.
He was convicted on multiple charges according to Reuters, including plotting a 2014 ambush that killed 22 military guards near the Libyan border and involvement in an attempt to assassinate a former interior minister in 2013.
For years, he was considered the country's most wanted militant for his intelligence value. His military expertise - he left the Egyptian army in 2011 - was considered key to the faction's growth from a tiny group into a well-organised guerrilla band that later inflicted painful blows on security forces in Sinai.
Ashmawy helped to found Ansar Bait al-Maqdis, but left the group in 2015 shortly after the group pledged allegiance to IS. He later announced the formation of Al-Mourabitoun, a militant group loyal to Al-Qaeda based in eastern Libya.
Al-Mourabitoun has been blamed for most of the attacks in Egypt's remote Western Desert, such as a 2017 ambush that killed nearly 30 Christian pilgrims on their way to a monastery.
Ansar Bait al-Maqdis is now known as Wilayat Sinai, or the province of Sinai, as part of IS.