Egyptian President Abdul Fattah al-Sisi has said a deal granting Ethiopia maritime access through the self-declared republic of Somaliland "is acceptable to no-one".
Speaking in Cairo next to Somalia's President Hassan Sheikh Mohamud, Mr Sisi said Egypt would not allow Somalia's security to be jeopardised.
"We are unwavering in our support for our brothers, and if they call upon us, we will not hesitate to act," Mr Sisi added.
But on Sunday, Ethiopia's national security affairs adviser Redwan Hussien said the contentious deal with Somaliland was meant for co-operation and partnership, and is not "annexation" or "assumption of sovereignty over the territory of any state".
In a statement on X, Mr Redwan said Ethiopia and Somalia "are not just neighbours who share a border but they are fraternal nations sharing a common language, culture and people".
"Our destiny is entwined and inseparable," he added.
Somalia sees Somaliland as its territory, and says the deal is illegal.
Egypt, for its part, has had problems with Ethiopia over the construction of the Renaissance Dam on the Blue Nile, a tributary of the River Nile, which it relies on for nearly all of its fresh water.