TEHRAN, Iran -- Iran on Thursday accused a Saudi-led coalition of hitting its embassy in Yemen in an airstrike and even though no damage was visible on the building from the outside, the allegation highlighted how the two countries' standoff could endanger the greater Middle East.

Hours later, in Saudi Arabia's eastern Shiite heartland, a memorial service was held honouring Sheikh Nimr al-Nimr, whose execution Saturday by the kingdom sparked regional protests culminating in attacks on Saudi diplomatic posts in Iran.

While armoured personnel carriers rumbled through the area and smoke from burning tires rose into the air, the service for the cleric who advocated for Shiite rights in the Sunni-ruled kingdom passed without violence. But anger could be felt in the hall, as videos showed mourners shouting: "Death to the Al Saud," a reference to the royal family.

The airstrike claim by Iran came on Thursday afternoon, when its state-run news agency said a Saudi-led airstrike the previous night had hit the Iranian embassy in Sanaa, citing Iran's Foreign Ministry. However, an Associated Press reporter who reached the site just after the announcement saw no damage to the building, which sits in a neighbourhood near a presidential palace that's seen many previous strikes.

Iran vowed to file a report about their claim to the United Nations, while the Saudi military issued a statement through the kingdom's state news agency, dismissing the allegation as false.

Iran's deputy foreign minister, Hossein Amir Abdollahian, was later Thursday quoted by the official IRNA news agency as saying that a Saudi "rocket hit near our embassy and one of the embassy guards was seriously injured." He said further details would come in a note to the United Nations.

Earlier, IRNA had said that shrapnel hit a wall of the embassy and injured several staff there.

Meanwhile, the Saudi deputy crown prince, widely thought to wield considerable power in the monarchy, said he didn't believe war would break out with Iran.

"It is something that we do not foresee at all, and whoever is pushing towards that is somebody who is not in their right mind," Deputy Crown Prince Mohammed bin Salman, the Saudi defence minister and 30-year-old son of King Salman, told The Economist magazine. "Because a war between Saudi Arabia and Iran is the beginning of a major catastrophe in the region. ... For sure we will not allow any such thing."

The diplomatic standoff between Iran and Saudi Arabia began on Saturday, when the kingdom executed al-Nimr and 46 others convicted of terror charges -- the largest mass execution it has carried out since 1980. Al-Nimr was a staunch critic of the Saudi government and demanded greater rights for the kingdom's Shiite population, but always denied advocating violence.

Iranian protesters responded by attacking the Saudi Embassy in Tehran and its consulate in Mashhad. Late Sunday, Saudi Arabia announced it was severing relations with Iran because of the assaults.

Since Saudi Arabia severed ties to Iran, a host of its allies have cut or reduced their ties as well.

On Thursday, Somalia joined Saudi allies such as Bahrain and Sudan and entirely cut diplomatic ties with Iran. The Somali Foreign Ministry said it recalled its acting ambassador to Tehran and ordered Iranian diplomats to leave Somalia within 72 hours over "Iran's continuous interference in Somalia's internal affairs."

In eastern Saudi Arabia, the home of al-Nimr and much of the kingdom's roughly 10 to 15 per cent Shiite population, three days of mourning over his death ended Wednesday night. The Shiites there held a memorial service Thursday night -- not a funeral, as the sheikh's brother has said Saudi authorities had already buried his body in an undisclosed cemetery.

There are concerns new unrest could erupt. Al-Nimr's brother, as well as another local resident of al-Awamiya in eastern Saudi Arabia, said they've heard gunfire on recent nights.

The local resident, who spoke to the AP on condition of anonymity out of fear for her safety, shared a mobile phone video showing Saudi armoured personnel carriers moving through local streets. Meanwhile, more protests were expected after Friday prayers, while mourners in Bahrain planned a candlelight vigil for the sheikh on Friday night.

More than 1,040 people were detained in Shiite protests in eastern Saudi Arabia between February 2011 and August 2014, demonstrations inspired by the Arab Spring, according to Human Rights Watch. The watchdog and other groups have alleged that Saudi officials discriminate against the Shiites by rarely allowing them to build mosques and limiting their access to public education, government employment and the justice system.

Speaking to The Economist, Prince Mohammed defended al-Nimr's execution.

"The court did not, at all, make any distinction between whether or not a person is Shiite or Sunni," the prince said in the interview conducted Monday and which the magazine published online Thursday night. "They are reviewing a crime, and a procedure, and a trial, and a sentence and carrying out the sentence."

However, many ultraconservatives of the Saudi Wahhabi school of Islam view Shiites as heretics. And human rights activists said al-Nimr's trial was tightly controlled and unfair.

Also Thursday, Iran banned the import of goods from Saudi Arabia over the diplomatic tensions, according to a report by Iranian state television. It said the decision came during an emergency meeting of the Cabinet of President Hassan Rouhani.

Iran's annual exports to Saudi Arabia are worth about $130 million a year and are mainly steel, cement and agricultural products. Iran's annual imports from Saudi Arabia total about $60 million a year and consisted mostly of packing materials and textiles.

In other developments, Saudi Foreign Minister Adel al-Jubeir arrived in Pakistan's capital, Islamabad, for meetings with Pakistani leaders. Pakistan, which is a predominantly Sunni Muslim state but has a large Shiite minority, has expressed hope that Saudi Arabia and Iran will be able to normalize their relations.

Al-Haj reported from Sanaa, Yemen. Associated Press writers Reem Khalifa in Manama, Bahrain, Jon Gambrell in Dubai, United Arab Emirates, Abdi Guled in Mogadishu, Somalia, Maram Mazen in Cairo and Munir Ahmed in Islamabad contributed to this report.