Majid Saeedi via Getty Images Worshipers attend a rally to protest the execution of Sheikh Nimr al-Nimr in Tehran, Iran.

RIYADH, Jan 2 (Reuters) - Saudi Arabia executed a prominent Shi’ite Muslim cleric and dozens of al Qaeda members on Saturday, signaling that it would not tolerate attacks, whether by Sunni jihadists or minority Shi’ites, and stirring sectarian anger across the region.

Hundreds of Shi’ite Muslims marched through Qatif district in Saudi Arabia’s Eastern Province in protest at the execution of cleric Nimr al-Nimr, an eyewitness said. They chanted “Down with the Al Saud!,” the name of the ruling Saudi royal family.

Nimr, the most vocal critic of the dynasty among the Shi’ite minority, had come to be seen as a leader of the sect’s younger activists, who rejected the quiet approach of older community leaders for failing to achieve equality with Sunnis.

Most of the 47 killed in the kingdom’s biggest mass execution for decades were Sunnis convicted of al Qaeda attacks in Saudi Arabia a decade ago. Four, including Nimr, were Shi’ites accused of involvement in shooting policemen.

STR via Getty Images Saudi Shiite women hold placards bearing a portrait of prominent Shiite Muslim cleric Nimr al-Nimr during a protest in the eastern coastal city of Qatif against his execution by Saudi authorities, on January 2, 2016.

The executions took place in 12 cities, four prisons using firing squads and the others beheading. In December, al Qaeda in the Arabian Peninsula threatened to retaliate against Saudi Arabia for any execution of its members.

The move further soured relations between Sunni-ruled Saudi Arabia and its Shi'ite regional rival, Iran, which had hailed Nimr as the champion of a marginalized Shi'ite minority.

The website of Iran's Supreme Leader, Ayatollah Ali Khamenei, carried a picture of a Saudi executioner next to notorious Islamic State executioner 'Jihadi John', with the caption "Any differences?", and the powerful Revolutionary Guards said "harsh revenge" would topple "this pro-terrorist, anti-Islamic regime." Saudi Arabia summoned the Iranian ambassador in response.

In Iraq, prominent religious and political figures demanded that ties be severed, calling into question fence-mending efforts by Riyadh that had been intended to boost a regional alliance against Islamic State militants.

Anadolu Agency via Getty Images Demonstrators burn tires during a protest, against the execution of prominent Shiite cleric Nimr al-Nimr by Saudi authorities, in Manama, Bahrain on January 2, 2016.

MESSAGE TO SAUDIS

However, the executions seemed mostly aimed at discouraging Saudis from jihadism after bombings and shootings by Sunni militants in Saudi Arabia over the past year killed dozens and Islamic State called on followers there to stage attacks.

After the executions, Islamic State urged its supporters to attack Saudi soldiers and police in revenge, in a message on Telegram, an encrypted messaging service used by the group's backers, the SITE monitoring group reported.

Saudi Arabia's ruling Al Saud family has grown increasingly worried in recent years as Middle East turmoil, especially in Syria and Iraq, has empowered Sunni militants seeking to bring it down and given room to Iran to spread its influence. A nuclear deal with Iran backed by Saudi Arabia's biggest ally, the United States, has done little to calm nerves in Riyadh.

But Saudi Arabia's Western allies, many of whom supply it with arms, are growing concerned about its new assertiveness.

EU foreign policy chief Federica Mogherini said Nimr's execution risked "dangerous consequences" by further inflaming sectarian tensions in the region, and a German Foreign Ministry official said it "strengthens our existing concerns about increasing tensions and deepening rifts in the region."

FAYEZ NURELDINE via Getty Images Saudi Interior Ministry's spokesman Mansur al-Turki gestures during a news conference at the Saudi Officers club in Riyadh, on January 2, 2016, following the execution of 47 people convicted of 'terrorism', including a prominent Shiite cleric Nimr al-Nimr.

The simultaneous execution of 47 people - 45 Saudis, one Egyptian and a man from Chad - was the biggest mass execution for security offenses in Saudi Arabia since the 1980 killing of 63 jihadist rebels who seized Mecca's Grand Mosque in 1979.

The 43 Sunni jihadists executed on Saturday, including several prominent al Qaeda leaders and ideologues, were convicted for attacks on Western compounds, government buildings and diplomatic missions that killed hundreds from 2003-06.

The four Shi'ites were convicted of involvement in shootings and petrol bomb attacks that killed several police during anti-government protests from 2011-13 in which over 20 members of the minority sect were also shot dead by the authorities.

Under Saudi Arabia's reading of Islamic law, such attacks are interpreted as "banditry," carrying an automatic sentence of death followed by public display of bodies on gibbets.

Grand Mufti Abdulaziz Al al-Sheikh, the kingdom's top religious authority, praised the executions as "just."

MOHAMMED AL-SHAIKH via Getty Images Bahraini women take part in a protest in the village of Jidhafs, west of Manama, against the execution of prominent Shiite Muslim cleric Nimr al-Nimr by Saudi authorities, on January 2, 2016.

RADICAL ISLAM

Most jihadist groups follow a radical interpretation of the Salafi branch of Islam, the strict Sunni Muslim school that was developed in Saudi Arabia and is still followed by its clergy; but they have long regarded the U.S.-allied Saudi establishment as an enemy.

Government-appointed clerics have for years denounced al Qaeda and Islamic State as religious "deviants," while the government has cracked down on jihadists at home, squeezed their funding streams abroad and stopped them traveling to fight.

Mustafa Alani, a security analyst close to the Interior Ministry, commented: "There is 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."

However, critics of the ruling family say it has not done enough to tackle the sectarian intolerance, hatred of infidels and praise for the principles of violent jihad propagated by Saudi clerics, which they see as contributing to militancy.

Anadolu Agency via Getty Images

Analysts have speculated that the execution of the four Shi'ites was partly to demonstrate to Saudi Arabia's majority Sunni Muslims that the government did not differentiate between political violence committed by members of the two sects.

Human rights groups have consistently attacked the kingdom's judicial process as unfair, pointing to accusations that confessions have been secured under torture and that defendants in court have been denied access to lawyers.

Family members of the executed Shi'ites have vigorously denied they were involved in attacks and said they were only peaceful protesters against sectarian discrimination in the Sunni-ruled kingdom.

Riyadh denies torture and says its judiciary is independent.

The cleric's brother, Mohammed al-Nimr, said he hoped any response in Qatif would be peaceful, but activists said new protests were possible.

"My mobile is getting non-stop messages from friends, all shocked and angry ... The fear is for the children among those detained," an activist in Qatif told Reuters.

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.

At least 157 people were put to death in Saudi Arabia last year, a big increase from the 90 executed in 2014. (Additional reporting by Sami Aboudi, Sam Wilkin, Noah Browning, Omar Fahmy and Katie Paul; editing by Ralph Boulton and Kevin Liffey)