CAIRO - Egypt will not allow any threat to Somalia, President Abdel Fattah al-Sisi said on Sunday after Ethiopia said it would consider recognising an independence claim by Somaliland in a deal that would give it access to a sea port.

The remarks were the strongest yet made on the issue by Egypt, which already has frosty relations with Ethiopia, and were a sign that Cairo may get involved in a dispute that has raised fresh tensions in the volatile Horn of Africa.

Somaliland declared independence from Somalia in 1991 but has not won recognition from any country. The port lease deal, which was agreed earlier this month but not yet finalised, would be a boon to landlocked Ethiopia and has enraged Somalia.

"Egypt will not allow anyone to threaten Somalia or affect its security," Sisi said, speaking at a news conference with visiting Somali President Hassan Sheikh Mohamud.

"Do not try Egypt, or try to threaten its brothers especially if they ask it to intervene," he added.

In a Jan. 1 memorandum of understanding, Ethiopia said it would consider recognising Somaliland's independence in return for the port access. It would lease 20 km (12 miles) of coastland around the port of Berbera, on the Gulf of Aden, for 50 years for military and commercial purposes.

Ethiopia's current main port for maritime exports is in the neighbouring country of Djibouti.

"My message to Ethiopia is that ... trying to seize a piece of land to control it is something no one will agree to," Sisi said, saying cooperation on development was a better strategy.

Ethiopia on Sunday rejected criticism from Egypt over the deal, saying it was merely a commercial agreement aimed at securing access to the sea and not an attempt to annex land.

"It isn't annexation or assumption of sovereignty over the territory of any state," Redwan Hussien, national security advisor to Ethiopia said in a post on X.

Egypt's foreign minister last week called Ethiopia a source of instability in the region, which the country's foreign ministry said was "irrelevant".

Relations between Egypt and Ethiopia, which share use of the Nile River, have been tense for years over a major dam Ethiopia has built on the Blue Nile.

(Reporting by Mohamed Hendawy Additional reporting by Dawit Endeshaw; Writing by Clauda Tanios and Nafisa Eltahir; Editing by Frances Kerry and Conor Humphries)