DUBAI (Reuters) - Al Qaeda has warned Saudi Arabia it will pay for the executions of dozens of its members, saying they were intended to be a new year’s gift to Riyadh’s Western allies aimed at consolidating the rule of the Saud dynasty.

Though it was the killing of a Shi-ite cleric in the Jan. 2 mass execution which sparked a crisis between Saudi Arabia and its regional rival Iran, most of the 47 executed were al Qaeda militants convicted of bombings and gun attacks in the kingdom.

In a statement dated Jan. 10, al Qaeda’s Yemeni branch and its North African wing said Riyadh had gone ahead with the executions despite a warning not to do so.

“But they (Riyadh) insisted on offering the blood of the good Mujahideen as a sacrifice for the Crusaders on their holiday, in the New Year,” the two groups said in the statement posted on social media.

“Let them wait for the day when God will heal the chests of the families of the martyrs, their brothers and those who love them from the arrogant infidel,” it added.

Al Qaeda’s Yemen branch threatened in December to “shed the blood of the soldiers of Al Saud” if its members were executed.

Last week, Islamic State, a Sunni rival of al Qaeda, threatened to destroy Saudi Arabian prisons holding jihadists after the executions.

Both organizations are fighting against Saudi Arabia, which has declared them terrorist groups and locked up thousands of their supporters.

Though it was the executions of Nimr al-Nimr, a prominent Shi-ite cleric and three other Shi’ite Muslims, which drove up sectarian tension with Shi-ite power Iran, analysts say they were meant mostly to send a signal to militant Sunnis.

These analysts suggest Saudi Arabia was aiming to crush support for Sunni jihadists active in the kingdom without alienating more moderate Sunnis.

Islamic State has claimed responsibility for a series of bombings and shootings in Saudi Arabia since Nov. 2014 that have killed more than 50 people, most of them Shi’ites but also more than 15 members of the security forces.