Riyadh: Four Saudi men have been sentenced to death for their role in one of the kingdom’s “bloodiest terror cells”, official SPA news agency has reported.

The agency said late Sunday that a special criminal court in Riyadh jailed “as many as 20” others for between two and 23 years for a variety of crimes.

These included embracing “deviant” thinking contrary to the Quran, a term usually used in Saudi Arabia to refer to Al Qaida suspects.

The defendants were also convicted of fighting abroad and purchasing five tonnes of aluminium nitrate — which can be used to make explosives.

They were also found guilty of booby-trapping vehicles to kill policemen, carrying out suicide bombings inside the country, planning to explode oil pipelines and killing foreigners as well as Islamic religious leaders, SPA said.

The convicted were given 30 days to appeal the verdicts.

SPA did not say when the offences occurred but the sentences are the latest in a series since authorities in 2011 established specialised courts to try Saudis and foreigners accused of belonging to Al Qaida or involvement in deadly attacks in the kingdom from 2003-2006.

These included assaults on housing compounds where foreigners lived, and led to a crackdown.

Last week, another court in Riyadh sentenced two men to death and jailed 13 others for killing a policeman and forming an Al Qaida cell in prison, SPA reported.