An Egyptian military court has sentenced 32 people to life in prison on terror charges including plotting to assassinate President Abdel-Fattah el-Sissi.

The court in Cairo Wednesday said the defendants attempted the president's assassination twice, including when he was on pilgrimage in Saudi Arabia in 2014.

The court also sentenced 264 other defendants, to three to 15 years in prison, all on terror charges, including militant attacks in the Sinai. Two were acquitted, and one defendant died during the trail, while a minor was referred another court.

Nearly half of the defendants were tried in absentia. The verdict can be appealed.

Rights groups have repeatedly criticized such mass sentencings in Egypt and have called on authorities to ensure fair trials.