A prosecutor in Egypt's Nile Delta says he has referred 40 people to trial on charges of belonging to the Islamic State group and planning to carry out terrorist attacks.

Bilal Abu Khadra, a prosecutor in Egypt's Sharqiya province, said Sunday that those charged communicated with Islamic State militants in Syria. He also says the cell's leader confessed to receiving money from the extremists to recruit and help militants travel to Syria.

Khadra says 20 of the defendants are detained, while the others will be tried in absentia.

The Islamic State group gained a foothold in Egypt last November when a Sinai-based militant group declared itself an affiliate. Khadra's announcement marks the first time people in the Nile Delta have been accused of belonging to the group.