Still, Erdogan's resolve to visit the Horn of Africa nation so soon after the deadly attack has only heightened his popularity. He landed at Mogadishu airport on Sunday morning and was greeted warmly by Somali President Hassan Sheikh Mohamud.

But how does someone currently facing a barrage of allegations - on account of corruption, delusions of grandeur, dictatorial tendencies, and polarising rhetoric - by both Turkish and western media, earn such an enviable stature in Somalia?

The fact is, Erdogan has done for Somalia what no other world leader has done in decades.

In August 2011, when Erdogan was still prime minister, he ignored the prevalent narrative of Mogadishu as a no-go zone and flew in with his family, senior cabinet members, and representatives from non-governmental organisations and the business sector.

His visit was the first by a non-African leader to the famine-hit Somali capital in two decades and came during the holy month of Ramadan to stress that Ankara was not going to abandon "their Muslim brothers and sisters".

From 1991 to 2011, the UN and its affiliated international institutions - mostly based in neighbouring Kenya - collected an estimated $55bn on behalf of Somalia. Dubiously, the nation in whose name this hefty sum was collected, has not gained any substantive infrastructure-related or any other sustainable project.

A massive bilateral nation-building effort followed; roads, hospitals, mosques, and schools were built, the airport was expanded, and many business partnerships were forged.

Within an incredibly short period of time, Erdogan's plan resuscitated Somalia from near death.

Nothing illustrates that fact more than the profound impact that the Turkish aid model has had on the average Internally Displaced Person (IDP) in Somalia.

In addition to setting up feeding centres that provide appetising foods, decent housing, and health clinics, the Turkish aid model has boosted the average IDP's standard of living with economic empowerment. This alone made Erdogan more popular than President Sharif Sheikh Ahmed of the Transitional Federal Government and the current Somali president.

In fact, Erdogan's name now ranks among the most popular choices for a newborn.

Africa tour

On the one hand, Erdogan's Somalia trip is part of an Africa tour intended to strengthen Turkey's economic and diplomatic ties with a dozen of its closest African partners.

On the other, it is aimed at re-energising the strategic partnership between Somalia and Turkey and to reaffirm the latter's commitment to be in it for the long haul.

There are some western states that appear to believe that the rise of Islamic-conscious leadership is bound to impact geopolitics and therefore the balance of power in various strategic regions.

Undeniably, Africa has become the 21st century's geopolitical and geo-economic centre of gravity, and for this reason, Turkey wants to strategically establish itself. With Somalia, Turkey has a sister nation at the heart of the Indian Ocean; a nation with which it shares deep historic ties, and a high potential emerging market.

Due to the competing interests of donor nations, the trajectory of Turkish-Somali relations has not been without its fair share of opposition.

Aside from al-Shabab - which considers any friend of the government as an enemy and claimed responsibility for Thursday's bomb attack - there are under-the-radar passive hostilities that emanate from certain elements within the international community.

This is mainly down to two reasons. First, the more Turkey builds on its success in Somalia, the more the incompetence and the systemic corruption of the international aid model is exposed.

Second, and perhaps more importantly, the more Turkey succeeds, the more the Turkish political model - a hybrid of modern government with Islamic ethos - gains global prominence.

Paving the way

In recent years, the so-called Arab Spring has paved the way for Islamists to take power in a number of Arab countries. Like the AK party in Turkey, Islamists in Egypt and Tunisia have swept all elections and risen to the highest political positions.

This has made some leaders in the Arab Gulf countries very nervous. In response, they have established cozy relations with Egypt's post-coup regime whose modus operandi could be summed as follows; a good Islamist is either buried underground or dies a slow painful death in dungeons.

Not being able to beat Islamists in the ballot boxes isn't an exclusively Arab fear. There are some western states that appear to believe that the rise of Islamic-conscious leadership is bound to impact geopolitics and therefore the balance of power in various strategic regions.

It is against this backdrop that Erdogan comes to Mogadishu, to cut the ribbon on a multimillion dollar, state-of-the-art hospital named after him. He is then scheduled to have a private meeting with his Somali counterpart.

Three issues are likely to top the agenda: major projects to jump-start the Somali economy; the Somali president's awkward relationship with Egypt's Abdel Fattah el-Sisi; and Turkey's readiness to use its $3bn investment in Ethiopia as leverage to help ease regional politics of division.

After all, Erdogan has prudently supported Somalia and remained impartial in the extremely fluid and clan-driven internal politics.

Ambassador Abukar Arman is the former Somalia special envoy to the United States and a foreign policy analyst.