An Egyptian court has sentenced the Muslim Brotherhood's supreme guide Mohammed Badie and two prominent leaders of the group to life in prison for "planning violent attacks", judicial officials and a lawyer said.

Badie and 37 others connected to the "Rabaa operations room" case are accused of conspiring to stir unrest during protests that followed the July 2013 military-led overthrow of Egypt's former president Mohamed Morsi, who hailed from the Brotherhood.

The Public Prosecutor's Office charged the accused with "preparing an operations room to confront the state and create chaos in the country following the dismantling of the Rabaa al-Adawiya sit-in" and "planning to burn public property and churches".

On August 14, 2013, security forces stormed a large protest gathering at Rabaa in the capital Cairo and allegedly shot hundreds of unarmed demonstrators.

The Giza criminal court sentenced 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 Mohammed Sultan, his father Salah Sultan, and Ahmed Aref, another spokesman for the group, were among other defendants sentenced to serve five years behind bars.

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

Other sentencees include two journalists from the Rassd news network, Abdullah al-Fakharany and Samy Mostafa, and a presenter of the Islamist Amgad channel, Mosaad al-Barbary.

READ MORE: Human Rights Watch calls for end to Egypt military aid

The court said the accused planned attacks on police installations and government institutions.

Twenty-one others were acquitted on Monday, 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 news agency. 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 Rabaa operations room case is one of several mass trials that have been conducted since Morsi was deposed.

Human rights groups, foreign governments and media organisations have criticised the trial for its inclusion of foreign nationals and journalists.