An Egyptian military court on Wednesday sentenced nearly 300 people to prison terms, including some who in 2014 attempted to attack President Abdel Fattah al-Sisi, security sources said.

Thirty-two were sentenced to life in prison, which is 25 years in Egypt, while 264 were jailed for terms of between three and 15 years, the sources said.

Two defendants were acquitted, the same sources added.

Sisi visited Saudi Arabia in 2014 for a pilgrimage with the kingdom’s then crown prince Mohammed bin Nayef.

Arab media outlets reported at the time an attack targeting the president during the pilgrimage, which was reportedly foiled, but the Egyptian presidency quickly refuted the story.

The indictees formed a total of 22 “terror” cells, the security sources said Wednesday, without detailing the specific charges they faced.

The accused were charged by a military court in 2016.

Some among the convicted group were sentenced for the 2015 assassination of three judges in El-Arish, North Sinai.

Others within the group were sentenced for targeting tourists and security forces, the same sources said, without giving further details.

Hundreds of Egyptian police officers and soldiers have been killed in attacks in North Sinai which surged after the army’s ouster of Islamist president Mohamed Morsi in 2013.

In early 2018, the army launched a nationwide offensive against extremists, including the Islamic State group, focused mainly on the North Sinai.

Some 650 alleged jihadists and around 50 Egyptian soldiers have been killed since the start of that operation, according to official figures.