A Saudi court has sentenced five men to death for their role in three suicide bomb attacks on expatriate residential compounds in Riyadh in May 2003.
Another 37 people were given imprisoned for between three and 35 years.
The attacks, which left 39 foreign nationals and Saudis dead, were part of a campaign by an al-Qaeda offshoot that aimed to destabilise the Gulf kingdom.
The authorities subsequently launched a three-year crackdown on the jihadist group, imprisoning thousands of people.
Although al-Qaeda has since struggled to operate in Saudi Arabia, a number of Saudis formed al-Qaeda in the Arabian Peninsula (AQAP) in neighbouring Yemen in 2009 and have become senior operatives.
The five men sentenced to death on Sunday have not been named.
However, the Sabq news website said they had been found guilty of rigging the car bombs used to attack the residential compounds.
The Saudi Gazette newspaper reported that one was a former guard at al-Hayer prison who had "sheltered one of the wanted terrorists" and been involved in a gun battle with police at an apartment complex in 2003.