CAIRO (Reuters) - An Egyptian court on Wednesday sentenced Muslim Brotherhood leader Mohamed Badie and his deputy Khairat al-Shater to life in prison, judicial sources said, in a retrial over violence during the overthrow of Islamist president Mohamed Mursi in 2013.

The sentence is one among several trials and retrials against Badie, Shater and other leaders of the party that ruled Egypt before the military ousted Mursi following mass protests against his rule.

Badie and Shater were sentenced to life in 2015 over violence between Brotherhood supporters and opponents near the group’s headquarters.

Four others were also handed life sentences on Wednesday. The court acquitted Saad al-Katatny, parliament speaker under Mursi, along with a former minister, two prominent Brotherhood figures and two others.

The defendants can appeal the ruling for the last time before the Court of Cassation, Egypt’s highest civilian court.

The public prosecution may also appeal the acquittals or the life sentences that two defendants received instead of death sentences.

The defendants faced charges of inciting violence against the demonstrators in front of the Brotherhood headquarters, aggravated battery and the possession of firearms.

Authorities had referred 18 defendants to trial in the case. Five remain at large and one died before receiving a sentence.

The latest retrial began when the Court of Cassation accepted 13 defendants’ appeals in January 2016.

Separately on Wednesday, two security sources and a judicial source said authorities arrested a justice minister under Mursi and are investigating him for belonging to an illegal group.

The security sources said National Security Agency officers arrested Ahmed Suleiman at his home in Minya governorate on Tuesday and later transferred him to Cairo.

Suleiman had criticized the arrest and trial of Brotherhood leaders after Mursi was ousted.

After Mursi’s ouster, Egypt cracked down on its oldest and most organized Islamist movement, killing hundreds of its supporters during the violent dispersal of a sit-in, throwing thousands of its supporters in jail and labeling the group a terrorist organization.

The Brotherhood says it is a peaceful movement and denies links to attacks by Islamist militants.