Egypt's state news agency says a Cairo court has convicted and sentenced five people to death on charges of forming a terrorist group and attacking a church, killing one policeman.

MENA said the court Saturday sentenced two others to life. Four of the defendants were tried in absentia, meaning that there will be an automatic retrial if they are arrested or hand themselves in.

Prosecutors had charged the defendants with forming a terrorist group that targets Christians and security forces starting October of last year.

Since the 2013 ouster of Islamist President Mohammed Morsi, Egypt has witnessed a surge in militant attacks, for which the government has blamed Morsi's Muslim Brotherhood group and their allies.

A security crackdown on Morsi supporters has killed hundreds and jailed tens of thousands.