An Egyptian appellate court ordered a retrial of militants accused of killing police officers in 2013. Its ruling Saturday overturned the convictions of a top militant and 15 others for allegedly killing 25 officers, the Associated Press reported.

The original court case was filed after militants attacked off-duty police officers traveling in minibuses outside Rafah, a town near Egypt's border with the Gaza Strip. The attack came days following a crackdown by security forces on supporters of deposed Islamist President Mohammed Morsi that left hundreds of people dead in Cairo. Morsi won Egypt's first free presidential election in 2012, but was ousted by the Egyptian army a year later.

Egyptian officials said the accused militants lined up the police officers and shot them, AP reported.

The retrial was ordered with Morsi himself facing a final death sentence June 16. A court issued a preliminary death sentence in May against the country's former leader and 105 other members of his Muslim Brotherhood in connection with a mass jailbreak in 2011. Since Morsi's ouster, the Egyptian government has cast the Brotherhood as an Islamist extremist group, but it has repeatedly maintained that it is committed to peace.

Morsi was already serving a 20-year prison sentence for allegedly ordering the arrest and torture of protesters during his time in office from June 2012 to July 2013. Reports differ about how Morsi escaped prison: Some said his friends and relatives helped him break out, while others said armed Brotherhood militia set them free. If Morsi is sentenced to death, he'll become the first president in Egypt's history to face the possibility of a public hanging.

Adel Habara, the top militant in the retrial ordered Saturday, was previously sentenced to death. Authorities said Habara is a senior member of the Sinai-based militant group Ansar Beit al-Maddis, AP reported. However, the group did not claim responsibility for the 2013 attack in Rafah. The other militants facing retrial were given lesser sentences, including as many as 15 years in prison.