Cairo (AFP) - An Egyptian court sentenced the Muslim Brotherhood's supreme guide Mohamed Badie to life in prison for "planning violent attacks" in a retrial on Monday, judicial officials and a lawyer said.

Badie was part of a group of 37 people accused of conspiring to stir unrest during protests that followed the July 2013 military-led ouster of Egypt's former Islamist president Mohamed Morsi, who hailed from the Brotherhood.

The court condemned Badie to a life term along with Mahmoud Ghozlan, a Brotherhood spokesman, and Hossam Abubakr, a member of its guidance bureau, the officials and defence lawyer Abdel Moneim Abdel Maksoud said.

US-Egyptian citizen Mohamed Soltan, his father Salah Soltan and Ahmed Aref, another spokesman for the group, were among 13 defendants sentenced to serve five years behind bars.

Egyptian authorities deported Mohamed Soltan to the United States in May 2015, while his father remains in custody.

The court on Monday acquitted 21 others, including Gehad Haddad, an international spokesman for the Brotherhood.

The retrial came after Egypt's court of cassation scrapped a 2015 ruling under which Badie and 13 others were condemned to death, and 34 defendants given life terms.

"We will appeal for everyone who was convicted," Abdel Maksoud told AFP. The court of cassation would have to issue a final ruling in such an appeal.

Badie is being prosecuted in more than 35 trials, according to his lawyers. He received three death sentences in other cases but those rulings have also been scrapped.

The court of cassation has cancelled scores of death sentences against Morsi supporters including against the deposed president himself.