John Bacon

USA TODAY

Saudi Arabia announced Sunday that it was severing ties with Iran, hours after Iranian protesters set fires in the Saudi Embassy compound in Tehran.

Saudi Foreign Minister Adel al-Jubeir said Iranian diplomats and staff had 48 hours to leave his country, the Associated Press reported. Tensions between the Middle East powers have intensified since the Saudis announced the execution Saturday of Sheik Nimr al-Nimr, a beloved cleric among Shiite Muslims known as a voice for free Saudi elections during the Arab Spring protests.

Al-Nimr was among 47 people executed by the Sunni-led Saudi government Saturday, and news of his death set off an outcry across much of the Muslim world. In Shiite-dominated Iran, angry protesters set fires and destroyed documents at the Saudi Embassy before security forces restored order Sunday, Iran's ISNA news agency said.

Iranian President Hassan Rouhani criticized the embassy riot. "In no way is this justifiable and foremost disrespects Iran," he said. "Such ugly acts (must be) stopped, and full security of political missions assured."

More than 40 arrests were made, and more were possible, Tehran prosecutor Abbas Jafari-Dowlatabadi said. Iranian leaders asked that protesters gather at the public square rather than at "diplomatic sites," ISNA reported.

Iranian protesters overrun Saudi embassy, set fires

Most of those executed by Saudi Arabia were Sunnis linked to al-Qaeda attacks in the kingdom. Al-Nimr was among four Shiites killed.

The U.S. State Department called on Tehran to protect the Saudi Embassy and urged both nations to avoid "exacerbating sectarian tensions."

Spokesman John Kirby later said the Obama administration was aware of the Saudis’ severing of ties with Tehran. “We believe that diplomatic engagement and direct conversations remain essential in working through differences," Kirby said.

A Saudi official had defended Saturday's executions as "implementation of sharia rulings." The official, Ali bin Suleiman Al-Obaid, vice general president for Prophet's Holy Mosque Affairs, also said those who were executed were terrorists.

5 reasons Saudi Arabia and Iran hate each other

Iran’s Ayatollah Ali Khamenei warned that "divine revenge will seize oppressors" responsible for "the martyrdom and unfair bloodshed" of al-Nimr.

Protesters in Tehran had scaled a chain-link fence protecting the embassy, took down the Saudi flag and set fires inside, according to tweets from journalist Sobhan Hassanvand at the privately owned Shargh newspaper. But the mob didn't destroy the flag because it is emblazoned with the Muslim statement of faith that Shiites and Sunnis share: "There is no God but Allah and Muhammad is his prophet."

"Huge crowd of people rushed toward the entrance gate of the building passing through resisting police forces and managed to break the gate,” according to Sadra Saeidian of Mehr News.

Protesters also gathered in Bahrain, Lebanon and even in India, Al-Jazeera reported.

Iraqi Prime Minister haider Al-Abadi said he was "shocked and saddened" by al-Nimr's death. "Peaceful opposition is a fundamental right. Repression does not last," he tweeted.

Hassan Nasrallah, leader of the Shiite militia in Lebanon, said al-Nimr's execution would "plague the Al Saud until the Day of Resurrection," the BBC reported.

The Iranian Foreign Ministry had summoned the deputy head of the Saudi mission in Tehran to protest the execution. Iranian Deputy Foreign Minister for Arab and African Affairs Hossein Amir-Abdollahian accused Saudi Arabia of triggering a new conflict in the region after the September disaster that killed more than 2,000 pilgrims who were suffocated or crushed during the annual Hajj pilgrimage in Mina, Mecca, ISNA reported.

Al-Nimr was a popular figure among young Shiite Saudis during the Arab Spring protests in 2011-2012. He was critical of the Saudi government and but denied advocating violence.

"The roar of the word against authorities rather than weapons," he told the BBC in 2011. Al-Nimr was shot by security forces and arrested in 2012. He was sentenced to die two years later.

The mass executions — beheading and shootings — "only further stains Saudi Arabia's troubling human rights record," said Sarah Leah, Middle East director for the U.S.-based non-profit Human Rights Watch.

United Nations Secretary-General Ban Ki Moon was “deeply dismayed” by the executions, according to a U.N. statement.

Contributing: Gregg Zoroya