A naval agreement between Turkey and Somalia positions the Turkish navy in a strategically vital region, underlining Ankara's growing ambitions at sea. But analysts warn that the deal threatens to escalate tensions with Somalia's neighbour, Ethiopia.
Under a ten-year defence agreement ratified earlier this month, the Turkish navy will help protect Somalia's territorial waters and facilitate training and equipment for the Somali navy.
The deal is just the latest step in Ankara's deepening relationship with Mogadishu.
"Not only is this the location of Turkey's largest international military base, it's also the location of Turkey's largest embassy in the world," explains Norman Ricklefs, chair of multinational consultancy group Namea.
"This shows the importance Turkey has placed on Somalia, and rebuilding Somalia as a major state in the Horn of Africa, and making Somalia's future success part of Turkey's broader strategic goals in eastern Africa in the Red Sea region," he says.
Turkey also signed an energy exploration deal with Somalia this month. The East African country is believed to have major oil and gas reserves both on land and within its territorial waters.
Blue-water navy
Experts see the deepening of ties with Somalia as part of growing international competition for influence in this strategically vital region.
"This will provide Turkey an opportunity to increase its influence in the Horn of Africa," says Elem Eyrice-Tepeciklioglu, an associate professor of African studies at Ankara's Social Sciences University.
"Because all those external countries – Gulf countries, Western countries... even Japan – have bases in Djibouti, they are all vying to increase their development in the region, especially for economic purposes. So this is also an opportunity for Turkey," she says.
The Somali deal comes as Ankara rapidly expands its navy's so-called "blue-water" capabilities – the ability to operate on the open oceans, far from the country's home ports.
Turkey has built up a fleet of energy research ships and a growing navy.
"[Naval expansion] focuses on the projection of Turkish military capacity in the maritime domain – both in protecting its own exclusive economic zones and waters, while also helping its allies and partners to do the same," explains Sine Ozkarasahin, an independent defence analyst.
"And Somalia has been facing an increased threat of piracy."
Tensions with Ethiopia
Turkey's deepening military ties with Somalia come as the Horn of Africa nation faces tension with its neighbour, Ethiopia.
In January, Ethiopia infuriated Somalia by signing an agreement with the breakaway region of Somaliland, giving Addis Ababa long-desired sea access.
But Mehmet Ozkan of the Turkish National Defence University says Ankara is well placed to contain any fallout, given its ties with Ethiopia.
"Military cooperation, personal cooperation, the personal relationship between the leaders – I think relations are pretty good," he says.
"Because in the region everybody is looking for security cooperation, and it's same for Ethiopia... Turkey is a security provider for Ethiopia as well."
'Drone diplomacy'
With Turkish-made military drones widely used by both the Ethiopian and Somali militaries in their wars against insurgencies, Ankara's so-called "drone diplomacy" has been instrumental in balancing its relations with rivals.
"Turkey has also probably supplied some drones to Somalia – which are operated by Turkish operators, not Somalis – but they've been useful in the conflict against Al-Shabaab," explains analyst Ricklefs.
"I know Turkey has a good relationship with Ethiopia. It has a good relationship with Somalia. So its presence in Somalia is more likely than not – given Turkey's broader strategic aims in the region – to have a stabilising effect rather than a destabilising effect," he argues.
However, Africa expert Eyrice-Tepeciklioglu warns that, given the region's volatility, Ankara will still need to tread carefully.
"In the long run, this might lead to Turkey's involvement in regional conflicts. This is what Turkey was trying to avoid in its Africa policy: it does not want to be a part of African conflicts, but it might be dragged into [them]," she says.
As Turkey extends its influence in one of the most volatile parts of the world, analysts suggest Ankara will need to perfect its diplomatic balancing skills.