CAIRO — An Egyptian judge convicted 12 Islamists Wednesday of murdering one of the most senior police officers to be killed in the country in recent months, sentencing them to death.

The ruling session was aired live on Egyptian television. As soon as judge Moataz Khafagi read out the sentence, the defendants broke out in chants of “God is great” in defiance while pacing around the cage. Only nine defendants were present, with the others were sentenced in absentia.

Gen. Nabil Farrag was shot dead in September during a raid on an Islamist stronghold in Kerdasa, just outside of Cairo. The raid followed an attack by militants on a police station, killing 15 policemen and mutilating their bodies, in one of the grisliest assaults on security forces.

The militants had taken control of the town, near the Pyramids, and attacked the police station to apparently avenge a violent crackdown on a sit-in of supporters of ousted Islamist ex-president Mohammed Morsi. The break-up of the sit-in killed hundreds, most of them Islamists.

The trial had opened in March.

Judge Khafagi referred the ruling to the Grand Mufti, the highest Islamist authority in Egypt, to review it before the final decision is pronounced on August 6.

Defendants then can appeal.

Copyright 2014 The Associated Press.