CAIRO (AP) — An Egyptian court acquitted on Sunday two police officers who were previously convicted and sentenced to five years over the killing of a detained lawyer.

The verdict by the Cairo Criminal Court overturned the earlier verdict against the officers, who were accused of beating lawyer Karim Hamdi to death in February 2015.

Hamdi was detained on charges of belonging to the Muslim Brotherhood, which won a series of free elections after Egypt's 2011 uprising but is now outlawed as a terrorist group.

Mohammed Morsi, a senior Brotherhood figure elected president in 2012, was overthrown by the military a year later, amid massive protests against his divisive rule. Since then, authorities have waged a heavy crackdown on the group.

Rights groups say torture and abuse are widespread in Egyptian detention facilities.

Also on Sunday, Egypt's chief prosecutor referred 278 terror suspects to a military court on charges of joining two breakaway Brotherhood factions that have targeted police and army officers across the country for years.

The suspects, who are members of the Hasm and Liwaa el-Thawra factions, set up dozens of small militant cells and carried out numerous attacks against security forces in at least 17 provinces, prosecutor Nabil Sadek said in a statement.

The charges against them, he said, include killing and plotting to kill security personnel, attacking military checkpoints and sabotaging electricity facilities across the country.

Only 141 of the 278 suspects are in custody, the statement said.

Egyptian authorities believe both groups, which have been designated as terrorist organizations by Egypt and the United States, to be splinter groups of Morsi's outlawed Muslim Brotherhood.

Egypt has been battling Islamic militants for years, but the insurgency gathered steam and grew deadlier after Morsi's 2013 ouster.

In February, Egypt's security forces launched an all-out offensive against militants, deploying tens of thousands of troops and police backed by fighter jets, helicopter gunships, navy vessels and tanks in the Sinai Peninsula and the Western Desert along the border with Libya.