The two neighbours had been at loggerheads since last January when landlocked Ethiopia signed a maritime deal with the breakaway Somaliland, which Somalia considers as part of its territory.