This follows Wednesday’s announcement in Istanbul that the Organisation of Islamic Cooperation would donate 245 million euros in emergency aid for famine relief in Somalia.
Turkey is going to reopen its embassy in Mogadishu, after closing it in 1991, due to security reasons.
Security is being tightened in Mogadishu and Somali government buildings are being refurbished.
In the centre of the city banners displaying Erdogan and the Somali President Sheikh Sharif Sheikh Ahmed side by side, have been erected.
They read, “We are grateful to Turkey for not forgetting us in these difficult times”.
The Turkish leader is expected to visit camps in Mogadishu housing Internally Displaced People.
The visit is intended to encourage other Muslim countries to wake up to the crisis in Somalia and donate emergency aid.
Sheikh Sharif Ahmed is expected to accompany Erdogan throughout the trip, which is especially significant given that Mogadishu was until recently a battle ground.