Africa has become embroiled in the diplomatic crisis arising from the execution by Saudi Arabia of Shiite cleric Nimr al-Nimr. Economic considerations play a large role.
Hours after Shiite cleric Nimr al-Nimr was executed on January 2, protesters in Iran, which has a majority Shiite population, attacked the Saudi embassy in Tehran.
The Saudis, most of whom adhere to the Sunni branch of Islam, reacted by cutting diplomatic relations with Iran.
In return, Iranian officials blamed Saudi Arabia for exacerbating tension in the region.
Meanwhile, some African nations with close ties to Saudi Arabia have sided with the kingdom ruled since January 2015 by King Salman bin Abdulaziz Al Saud.
The first to act was Sudan, which has a majority-Sunni Muslim population of 97 percent. The government in Khartoum gave Iranian diplomats two weeks to leave the country.
Somalia and Djibouti were quick to issue statements expressing solidarity with Saudi Arabia.
On Thursday Somalia went a step further and cut diplomatic ties with Iran. A statement from the Somali foreign ministry said its acting ambassador to Iran had been recalled and Iranian diplomats had been ordered to leave Somalia within 72 hours.
Saudi support for Sudan
In an interview with DW, Ahmed Soliman, a research associate at London-based think tank Chatham House, said African countries' solidarity with Saudi Arabia was linked to economic considerations.
"There are financial implications. In the latter part of 2015, deals were concluded in the areas of agriculture and dams between the Saudi and Sudanese governments," Soliman said.
Sudan and Saudi Arabia signed an agreement in November 2015 for the construction of three dams at a cost of 1.25 billion dollars (1.15 billion euros). Riyadh is to pay another half a billion dollars for other water and electricity projects.
"Saudi Arabia is also financing infrastructure projects in countries like Somalia which are recovering from civil strife. Those issues play into cultural and religious relations which may be less important," Soliman said.
Sudan has also become involved in the conflict in Yemen where Iran and Saudi Arabia are backing opposing sides. Sudan is believed to have 6,000 troops fighting alongside the Saudi-backed government against the Iran-aligned Houthi rebels.
Sectarian violence fears
Nigerian political scientist Kamilu Sani Fage, from the University of Kano, says tensions are bound to rise in countries which have both Sunni and Shiite communities if the diplomatic row is not properly handled.
"The standoff between Saudi Arabia and Iran will have a great impact on some African countries. The traditional tensions between Sunni and Shiite groups could degenerate into sectarian violence," Fage said.
Protestors are calling for the release of Nigerian cleric Ibraheem Zakzaky (on the left in small photo)
When problems between the Nigerian army and Shiite Muslims broke out in the last two weeks, Iran, which is seen as the guardian of the Shiite branch of Islam, was quick to condemn the reported killing of hundreds of Shiites.
The Nigerian military said troops advanced on sites in Zaria in northern Nigeria after hundreds of Shiites attacked the convoy of an army chief.
Shiite leader Ibraheem Zakzaky suffered four bullet wounds and was taken into custody. Iran has demanded his release.
Nigeria has not responded to this demand which Fage describes as interference in the West African state's internal affairs.
"The Nigerian government may have chosen to play down the affair as it comes at a time when Nigeria is bedevilled by the problem of [militant Islamist group] Boko Haram. If another religious clash were to happen, it would be a disaster," Fage said.
The escalating diplomatic tensions between Iran and Saudi Arabia also have a big impact on Nigeria as Africa's top oil producing nation.
Members of the Organization of Oil Producing Countries (OPEC) have struggled with crude values that have tumbled by 60 percent since mid-2014.
Nigeria's economy is feeling the pinch as the grouping grapples to find a common response to the rock bottom oil prices.
Saudi Arabia is leading Gulf countries in the refusal to cut down production in order to push prices back up.
Countries in the Horn of Africa are also considering the economic importance of their diasporas in Saudi Arabia.
"There is a significant amount of Horn of Africa nationals who are living and working in Saudi Arabia. Their parent countries would want to protect the interests of their citizens. Anything that will jeopardize their nationals, the governments will take an interest," Ahmed Soliman said.
He added that it would be beneficial for African countries to keep away from the diplomatic row between Saudi Arabia and Iran for the sake of future relations, not least because of the agreement reached last year on limiting Iran's nuclear capability.
"Iran seems to be opening up in terms of its international relations so it wouldn't be beneficial to come out too openly for one side or the other," Soliman said.