Saudi Arabia said on Sunday it had severed ties with Iran over the storming of the Saudi embassy in Tehran, in a worsening diplomatic crisis between the regional rivals following the kingdom's execution of a prominent Shia cleric.

Foreign Minister Adel al-Jubeir told a news conference Iran's diplomatic mission and related entities in Saudi Arabia had been given 48 hours to leave. He said Riyadh would not allow the Islamic Republic to undermine the Sunni kingdom's security.

Saudi Arabian Foreign Minister Adel Al-Jubeir, left, has given Iran's diplomatic mission 48 hours to leave the kingdom. But Iranian Deputy Foreign Minister Hossein Amir-Abdollahian says the kingdom cannot cover up "its major mistake of executing Sheikh Nimr" by cutting diplomatic ties with Iran. (Jacky Naegelen, Maxim Shemetov/Reuters) Iranian protesters stormed the Saudi embassy in Tehran early on Sunday and Shia Muslim Iran's top leader, Ayatollah Ali Khamenei, predicted "divine vengeance" for the execution of Sheikh Nimr al-Nimr, an outspoken opponent of the kingdom's ruling Al Saudi family.

Jubeir said the attack in Tehran was in line with what he said were earlier Iranian assaults on foreign embassies there and with Iranian policies of destabilising the region by creating "terrorist cells" in Saudi Arabia.

Canada condemns executions

Speaking on Iranian state television, Deputy Foreign Minister Hossein Amir-Abdollahian said in Tehran's first response that by cutting diplomatic ties, Riyadh could not cover up "its major mistake of executing Sheikh Nimr."

The United States, Saudi Arabia's biggest backer in the West, responded by encouraging diplomatic engagement and calling for leaders in the region to take "affirmative steps" to reduce tensions.

Canada echoed U.S. calls for a diplomatic solution, but also strongly condemned Saudi Arabia's execution of Nimr and 46 other prisoners.

"In the wake of these executions, we reiterate our call to the Government of Saudi Arabia to protect human rights, respect peaceful expressions of dissent and ensure fairness in judicial proceedings," Foreign Affairs Minister Stéphane Dion said in a statement.

"Canada is particularly concerned that the execution of Sheikh Nimr al-Nimr could further inflame sectarian tensions in the region. We urge Saudi Arabian authorities and local and regional leaders, including those in Iran, to work with all communities to defuse these tensions and promote reconciliation."

'Re-engagement with Iran'

Canada closed its embassy in Tehran in 2012, quietly pulling all its staff out of the city, citing fear for their safety among a number of reasons. Relations have been severed ever since.

Asked about the current status of Canada's relationship with Iran, foreign affairs spokeswoman Rachna Mishra said the government will "proceed with re-engagement step by step and will continue to speak out about issues of concern such as human rights violations or Tehran's regional policies."

She added: "Engagement does not mean that we agree with the Iranian regime but it is important to be able to engage with such countries to promote meaningful change."

Iranians arrested for embassy attack

Tensions between revolutionary, mainly Shia Iran and Saudi Arabia's conservative Sunni monarchy have run high for years as they backed opposing forces in wars and political conflicts across the Middle East, usually along sectarian lines.

However, Saturday's execution of a cleric whose death Iran had warned would "cost Saudi Arabia dearly," and the storming of the kingdom's Tehran embassy, raised the pitch of the rivalry.

Lebanon's Hezbollah leader Sayyed Hassan Nasrallah addresses his supporters via a screen during a memorial service to mourn the death of Sheikh Mohammad Khatoun, who was a member of Hezbollah Central Council, and to condemn the execution of Sheikh al-Nimr. (Issam Kobeisi/Reuters) Strong rhetoric from Tehran was matched by Iran's Shia allies across the region, with Sayyed Hassan Nasrallah, the head of Lebanese militia Hezbollah, describing the execution as "a message of blood."

Demonstrators protesting against the execution of the cleric broke into the embassy building, smashed furniture and started fires before being ejected by police.

Iranian President Hassan Rouhani condemned the execution as "inhuman," but also urged the prosecution of "extremist individuals" for attacking the embassy and the Saudi consulate in the northeastern city of Mashhad, state media reported.

Tehran's police chief said an unspecified number of "unruly elements" were arrested for attacking the embassy with petrol bombs and rocks. A prosecutor said 40 people were held.

'Divine vengeance'

"The unjustly spilled blood of this oppressed martyr will no doubt soon show its effect and divine vengeance will befall Saudi politicians," Iran's Supreme Leader Ayatollah Ali Khamenei was quoted as saying by Iran's state television.

Nimr, the most vocal critic of the dynasty among the Shia minority, had come to be seen as a leader of the sect's younger activists, who had tired of the failure of older, more measured, leaders to achieve equality with Sunnis.

Iranian Supreme Leader Ayatollah Ali Khamenei predicted "divine vengeance" for the execution of Sheikh Nimr al-Nimr, an outspoken opponent of the Saudi Arabia's ruling family. (Office of the Iranian Supreme Leader/Associated Press) His execution, along with three other Shias and 43 members of al-Qaeda, sparked angry protests in the Qatif region in eastern Saudi Arabia, where demonstrators denounced the ruling Al Saud dynasty, and in the nearby Gulf kingdom of Bahrain.

Relatives of Nimr, reached by telephone, said authorities had informed them that the body had been buried "in a cemetery of Muslims" and would not be handed over to the family.

Although most of the 47 men killed in the kingdom's biggest mass execution for decades were Sunnis convicted of al-Qaeda attacks in Saudi Arabia a decade ago, it was Nimr and three other Shias, all accused of involvement in shooting police, who attracted most attention in the region and beyond.

Iraqi protesters carry posters of Sheik al-Nimr during a protest in Baghdad, Iraq, on Sunday, Jan. 3. (Karim Kadim/Associated Press) In Iraq, whose Shia-led government is close to Iran, religious and political figures demanded that ties with Riyadh be severed, calling into question Saudi attempts to forge a regional alliance against Islamic State, which controls swaths of Iraq and Syria.

Iraq's top Shia cleric Grand Ayatollah Ali al-Sistani described the executions as an "unjust aggression."

The opinion of Sistani, based in the Shia holy city of Najaf south of Baghdad, carries weight with millions of Shias in Iraq and across the region, including in Saudi Arabia.

The executions seemed mostly aimed at discouraging jihadism in Saudi Arabia, where dozens have died in the past year in attacks by Sunni militants.

The U.S. State Department said Nimr's execution "risks exacerbating sectarian tensions at a time when they urgently need to be reduced," a sentiment echoed by EU foreign policy chief Federica Mogherini.