Egyptian President Abdel Fattah al-Sisi visited Ankara this week, signalling the end to years of animosity with his Turkish counterpart Recep Tayyip Erdogan. The two leaders committed themselves to a new era of cooperation – but some observers question how long it will last.
The Egyptian president received a full diplomatic reception, with military bands and horses parading the Egyptian flag through the streets of the Turkish capital on Wednesday.
Erdogan did not hold back in welcoming a man he once dubbed a "brutal dictator", and signalled a new era of partnership between the two countries.
"With our joint declaration, we confirmed our will to advance our cooperation in all fields, including industry, trade, defence, health, environment and energy," the Turkish president declared.
String of bilateral agreements
The two leaders signed no fewer than 17 agreements to deepen bilateral trade, diplomatic and military cooperation.
The goal is to expand their annual commercial exchanges to over €13 billion in five years, from a little over €9 billion now.
They also discussed their concerns linked to the Israel-Hamas war in Gaza and the shared desire to see a ceasefire there – part of a wider trend of converging regional interests.
Sisi's visit follows Erdogan's trip to Cairo in February, which resulted from years of efforts to mend damaged relations.
Ankara and Cairo cut ties in 2013 after Sisi, then defence minister, ousted Islamist president Mohamed Morsi – Turkey's ally and part of the Muslim Brotherhood movement.
Question of Somaliland
Despite the decade of estrangement, trade between the two countries never ceased: Turkey is Egypt's fifth-largest trading partner, while Egypt is Turkey's largest in Africa.
With the Egyptian and Turkish economies in difficulty, the need to increase bilateral trade is seen as a powerful impetus towards rapprochement and a driving force for cooperation.
It could also ease tension in oil-rich Libya, which has been in a state of civil war for over a decade and where Cairo and Ankara back rival governments.
Libyan security analyst Aya Burweila says that Libya has become an important arena for both countries.
"Because the lines in the sand are so set – and each country has its sphere of influence – this has helped both countries realise that it's much more lucrative if they cooperate rather than fight each other," she told RFI.
Sisi and Erdogan also discussed tensions between Somalia and Ethiopia over the breakaway state of Somaliland, following reports that Egypt has started deploying weapons to Mogadishu.
The deployment is part of Egypt's bitter dispute with Ethiopia over its Grand Renaissance Dam, which Cairo claims seriously threatens vital water supplies from the Nile River.
Rivalry paused, not ended?
However, analysts suggest Egypt could also be seeking to challenge Turkey's influence in Somalia – in which it has heavily invested – as well as complicating Ankara's efforts to mediate between the Somali and Ethiopian governments.
Elem Eyrice-Tepeciklioglu, a professor of African studies at the Social Sciences University of Ankara, acknowledges the danger – but predicts Erdogan and Sisi will initially seek common ground.
"Both Egypt and Turkey can cooperate in Somalia, especially in terms of security," she observes.
"They can implement joint anti-terrorism initiatives. They can combine their efforts in development projects. They can involve themselves in political stabilisation initiatives, and so on.
"But they can also compete with each other for a more significant role and influence in Somalia."
For now, though, most experts seem to agree that with the spectre of a wider regional conflict and increasing economic pressures, Erdogan and Sisi are fully aware that cooperation, rather than rivalry, is in both their interests.