With more than three dozen embassies and billions of dollars in trade, Turkey has quietly built strong ties across Africa over the past decade. In September, the opening of a base in Somalia expanded that presence to include military power.
Turkey already had a long history of engagement with north African countries, said David Shinn, an adjunct professor at George Washington University's Elliott School of International Affairs. In 2016, Turkey conducted more than $10 billion in trade with Egypt, Algeria and Morocco.
What's new is the country's expansion into sub-Saharan Africa. Turkish Airlines now flies to more than 50 cities across the continent, and construction firm Yapi Merkezi is building a multibillion-dollar railway line across Ethiopia and Tanzania.
Turkey's connections to Africa focus mainly on economics, said Shinn, who believes Turkey is looking to expand its exports and increase direct investment through private companies.
Politics also figure prominently in the relationship. Turkish President Recep Tayyip Erdogan has made Africa a centerpiece of his foreign policy.
In an opinion piece published by Al-Jazeera last year, Erdogan said, "Many people in the world associate the African continent with extreme poverty, violent conflict and a general state of hopelessness. The people of Turkey have a different view. We believe Africa deserves better."
Shinn said that the new military base in Somalia —Turkey's first in Africa and the largest outside Turkish borders — shows an interest in projecting power and deepening strategic alliances.
Turkey's presence in Somalia dates back to the Ottoman Empire, when Turkish enclaves dotted the Somali coast.
Economics aren't driving Turkey's present interest — it's engaged in very little trade with the Horn of Africa nation, which has struggled with years of conflict, drought and food insecurity.
Instead, Somalia's proximity and overwhelmingly Muslim population make it an appealing partner, Shinn said. And Erdogan believes he can make a difference in Somalia.
On October 14, Somalia suffered the worst terrorist attack since at least 1997 when a truck bomb exploded in Mogadishu, the capital. More than 350 people were killed.
Turkey responded with immediate support and solidarity, condemning the bombing and airlifting injured survivors to a hospital in its capital, Ankara.
Days later, Somali Prime Minister Hassan Ali Khaire flew to Ankara to meet his counterpart, Binali Yildirim, and visit the victims.
"Turkey's help and support will be written in our history books, and we will never forget that," Khaire said at a press conference.
Turkey's recent presence in Somalia dates to 2011, when it became involved in various humanitarian and development programs in the midst of one of the country's worst droughts.
With a new military base just south of the Somali capital, Turkey will train thousands of Somali soldiers ahead of a planned withdrawal of AMISOM, the international peacekeeping force.
That could have a significant effect on the fight against al-Shabab, the extremist group most experts consider to be behind last month's attack.
Al-Shabab garners some support from its claim that it's fighting foreign invaders — most AMISOM soldiers are Christians from Ethiopia, Uganda and Burundi, Serhat Orakci, an Africa expert with the IHH Humanitarian Relief Foundation, told VOA.
Most Turks, in contrast, are Muslims like Somalis.
Since 2015, Erdogan has visited Ethiopia, Djibouti, Somalia, Kenya, Uganda, Tanzania, Mozambique and Madagascar. Along the way, he has asked — if not demanded — that the governments shut down their Gulen schools. These Islamic schools are named after Fethullah Gulen, a preacher and the founder of the Gulen movement.
The call for the closures is personal. Erdogan believes Gulen, who lives in the United States in self-imposed exile, was behind a July 15, 2016 coup attempt. Gulen denies involvement. More than 250 people were killed as plotters used aircraft and tanks to bomb Turkish institutions.
So far, Erdogan's requests have worked. At least six governments in Africa have complied with his demands to shutter the schools, despite their popularity.
Shinn doesn't see Turkey continuing to expand its presence in Africa, particularly after Erdogan leaves office. "I'm not convinced that any successor to Erdogan will have as much interest in Africa as he has demonstrated," Shinn said.
Even to maintain its presence, Turkey's economy must remain strong, Shinn added.
For the time being, Turkey is poised to deepen its engagement at least with Somalia, making it a critical regional player in the fight against extremism.