RIYADH, Saudi Arabia — A Saudi court sentenced one man to death and 13 others to prison for their role in killing a foreigner, attacking government buildings and residential compounds and planning an assault on the U.S. and British embassies, state media said.

The men, whose nationalities were not disclosed, were part of an alleged 50-member terrorist cell that faces a host of charges, including plotting to assassinate senior government officials and smuggling heavy weapons into the kingdom from Iraq. They are also charged with the abduction and killing of a foreigner, impersonating police officers, fighting in conflicts abroad, firing at Saudi security officers and disobeying the king, according to the official Saudi Press Agency.

A Riyadh court found the 14 men guilty of being involved in an attack on a foreigner who was stopped at a fake checkpoint, the state news agency said late Monday. Impersonating security officers, the militants drugged the foreigner to abduct him, then beat him to death before beheading him, the agency said.

The Arabic language newspaper Al-Sharq Al-Awsat reported that the man they were charged with killing is Paul Marshall Johnson, a 49 year-old American who had worked in the kingdom for more than a decade and was working on Apache attack helicopter systems for Lockheed Martin at the time of his kidnapping and death in 2004.

The militants had threatened to kill him if the kingdom did not release its al-Qaida prisoners.

After Saudi authorities refused to comply with their demands, the gruesome photos of his severed head were posted on the Internet, prompting strong condemnation from then-President George W. Bush.

The killing came at a time when al-Qaida militants were escalating attacks in the kingdom aimed at toppling the monarchy. A fierce crackdown by Saudi Arabia's security forces forced many militants to flee to neighboring Yemen, which now has one of the world's most active al-Qaida branches.

The 13 men were given prison sentences ranging from four to 30 years. All will be allowed to appeal the verdict.

Two others among the 50 defendants on trial will be given more time to submit additional evidence while a ruling on the rest of the cell's alleged members is expected soon, the Saudi news agency said. It did not say if all 50 suspected cell members were in custody, or whether some were being tried in absentia.

A senior government official contacted by The Associated Press declined to give further details.

Aya Batrawy contributed reporting from Dubai, United Arab Emirates.