Somalia said the deal has no legal force and threatens regional stability.

Government spokesman, Farhan Mohamed Jimale.

"Ethiopia's step is an offensive that endangers the stability and peace of the region which was already wobbling with problems. It is a violation and an open invasion of Somalia's sovereignty, freedom, and unity of The Federal Republic of Somalia. The so-called memorandum of understanding and agreement of cooperation is null and void."

The agreement would permit landlocked Ethiopia, which relies on neighboring Djibouti for most of its maritime trade, to set up commercial operations at a leased military base in Berbera.

Ethiopia's national security adviser confirmed Monday that it would offer Somaliland a stake in its state-owned airline in return.

The agreement also included recognising Somaliland as an independent nation in due course.

Ethiopian Prime Minister Abiy Ahmed's stated ambition to secure access to the Red Sea is a source of tension with its east African neighbours.

And that's raising concerns about a fresh conflict in the Horn of Africa.

The Ethiopian government did not immediately respond to requests for comment.

Despite declaring autonomy from Somalia in 1991, Somaliland has not gained international recognition.

Somalia says Somaliland is part of its territory.

Last week the Somali National News Agency said the two parties had agreed to restart talks, following mediation efforts led by Djibouti.