Somali President Hassan Sheikh Mohamud said his country would "defend itself" if Ethiopia goes ahead with a deal to set up a naval base in the breakaway region of Somaliland and possibly recognise the territory as an independent state.
Landlocked Ethiopia agreed a memorandum of understanding on January 1 to lease 20 km (12 miles) of coastline in Somaliland - a territory that Somalia says it owns, even though the northern region has enjoyed effective autonomy since 1991.
Ethiopia said it wants to set up a naval base there and offered possible recognition of Somaliland in exchange - prompting a defiant response from Somalia and fears the deal could further destabilise the Horn of Africa.
"If Ethiopia insists, Somalia will resist and will refuse," Mohamud told Reuters on Tuesday in an interview at the heavily fortified presidential palace in Mogadishu.
'Do everything'
"If they come into the country, Somalia will do everything that it can to defend itself."
He did not go into further detail on what action Somalia might take.
The Horn of Africa has experienced repeated conflicts, feeding humanitarian crises in areas prone to drought. Neighbouring Ethiopia and Somalia fought over territory in 1977-1978 and 1982.
Mohamud said he would only agree to discuss the matter with Ethiopian Prime Minister Abiy Ahmed when the government in Addis Ababa renounces its intention "to take part of our country".
Sea access
Ethiopia's government spokesperson did not respond to a request for comment. Abiy has previously said Ethiopia has no plans to start a conflict with Somalia and is merely trying to address its need for sea access.
Mohamud said he was not considering kicking out the nearly 3,000 Ethiopian soldiers stationed in Somalia as part of an African Union peacekeeping mission fighting militants from al Shabaab, an al Qaeda affiliate.
Analysts and diplomats fear a withdrawal of Ethiopian troops would further destabilise Somalia, where al Shabaab attacks have killed thousands of civilians and soldiers since 2006.
Somalia and several Western countries have said Ethiopia's port deal has boosted al Shabaab's recruitment efforts.
➤Click here to follow our WhatsApp channel for more stories.