
Prime Minister Hamza Abdi Barre also vowed that Somalia would defend its territory by "all legal means possible" following Monday's agreement that gives landlocked Ethiopia long sought-after access to the Red Sea.
The government said it was appealing to international bodies including the United Nations and the African Union to stand with Somalia.
"Somaliland is part of Somalia under the Somali constitution so Somalia finds this step to be a clear violation against its sovereignty and unity," the Somali cabinet said in a statement.
It said the memorandum of understanding signed in Addis Ababa on Monday was "null and void with no legal basis and Somalia will not accept it".
"In response to this, the Somali government has recalled its ambassador in Ethiopia for consultation."