Saudi Arabia executed 47 people on Saturday for terrorism it said, an apparent message to both Sunni Muslim jihadists and Shia anti-government protesters that the kingdom will brook no violent dissent.
The deaths come amid a growing war of words between Saudi Arabia and the militant group Islamic State, which called for attacks in the kingdom. But it may also raise tensions with Iran over the execution of prominent Shia cleric Nimr al-Nimr.
Tehran warned last year that executing Nimr would "cost Saudi Arabia dearly".
Most of those executed were convicted of leading or carrying out a series of al Qaeda attacks in Saudi Arabia after 2003, but they also included some members of the Shia minority convicted of attacks on police during protests from 2011-13.
In a statement issued on state television and other official media, the Interior Ministry named the 47 dead men and listed crimes that included both involvement in attacks and embracing jihadist ideology.
The simultaneous execution of 47 people on security grounds was the biggest mass execution for such offences in Saudi Arabia since the 1980 killing of 63 jihadist rebels who seized Mecca's Grand Mosque in 1979.
Saudi Arabia in 2015 suffered a series of further bombing and shooting attacks by jihadist militants sympathetic to Islamic State group. Those attacks killed dozens, increasing pressure on Riyadh to show it was taking strong action.
"There is a huge popular pressure on the government to punish those people. It included all the leaders of al Qaeda, all the ones responsible for shedding blood. It sends a message," said Mustafa Alani, a security analyst close to the Interior Ministry.
The kingdom detained thousands of militant Islamists after a series of al Qaeda attacks from 2003-06 that killed hundreds, and has convicted hundreds of them.
However, it also detained hundreds of members of its Shia minority after protests from 2011-13, during which several policemen were killed in shooting and petrol bomb attacks.
At least three other Shias were executed alongside Nimr, including Ali al-Rubh, whom relatives said was a juvenile at the time of the crime for which he was convicted, Mohammed al-Shayoukh and Mohammed Suwaymil.
Activists in the Shia district of Qatif have warned of possible protests in response to the executions. However, Nimr's brother, Mohammed al-Nimr, said he hoped any response would be peaceful.
The Interior Ministry statement began with Koranic verses justifying the use of execution and state television showed footage of the aftermath of al Qaeda attacks in the last decade. Saudi Grand Mufti Sheikh Abdulaziz Al al-Sheikh appeared on television soon after to describe the executions as just.
Major General Mansour Al-Turki, a security spokesman from the Saudi Arabian Ministry of Interior, gestures during a news conference on the executions of 47 people, in Riyadh, Saudi Arabia January 2, 2016. REUTERS