Al Qaeda's affiliate in Yemen threatened the Saudi government over its plan to carry out a mass execution of prisoners, including al Qaeda members, the militant group announced in a statement posted on social media.
Al Qaeda in the Arabian Peninsula (AQAP), one of the deadliest branches of the global militant network, said it was aware of Saudi intentions to execute its members in Saudi prisons and pledged to carry out attacks in response.
"We swear to God, our blood will be shed before the blood of our captives, and their pure blood will not dry before we shed the blood of the soldiers of Al Saud," the group said in a statement which was posted on Twitter and dated Tuesday.
"We will not enjoy life unless we get the necks of the Al Saud rulers."
Local media reported last week that Saudi authorities planned to execute more than 50 people convicted of "terrorist crimes".
The Saudi monarchy has faced a rise in militant attacks in the past year, with the Syria and Iraq-based Islamic State militant group claiming responsibility for a string of mosque bombings and shootings.
The only people executed for al Qaeda attacks in the kingdom, which killed hundreds in the last decade, were two men from Chad earlier this year.
Saudi Arabia has executed at least 151 people this year, according to Amnesty International, many of them foreigners convicted of drug-related crimes.
The last time the kingdom carried out mass executions for security offences was after a group of Islamist militants seized Mecca's Grand Mosque in 1979.