The Djibouti governments has agreed to Ethiopia's proposal for acquiring a share of the former's port.
The agreement comes after Djibouti unilaterally annulled a contract with the United Arab Emirates' giant Dubai Ports World (DP) two months ago.
Ethiopia Prime Minster Abiy Ahmed secured the agreement on his first foreign visit as head of state to Djibouti over the weekend.
Mr Abiy held talks with the host President Ismail Omar Guelleh and also addressed the Djibouti parliament.
Ethiopian government spokesman Ahmed Shide said the percentage apportioned was yet to be determined by experts after assessing the value and profit margins of the port.
Formal agreements will be signed within two months and experts from both countries have been tasked to do the paper work, according to Mr Ahmed.
Ethiopia also agreed to apportion to Djibouti shares in its major firms of their choice, including the Ethiopian Airlines. Djibouti also shown an interest in agricultural activities in Ethiopia.
The tiny Djibouti has previously been allowed to pump 200 metric cube drinking water daily from Ethiopia's Somali region.
More than 95 per cent of Ethiopia's import and export trade passes through the Djibouti Port.
A serious disagreement erupted between DP-World, the main port administrator, and the Djibouti government last January.
RELATED CONTENT: Somali parliament votes against UAE port deal
Two private shipping companies, Singapore’s Pacific International Lines (PIL) and France' Compagnie Maritime d'Affrètement (CMA)- Compagnie Générale Maritime (CMA/CGM), were negotiating with Djibouti to further develop the recently inaugurated Doraleh container terminal, at an estimated $600 million.
DP-World has filed a law suit in London against the Djibouti government, demanding that the previous agreement be honoured until the case is resolved.
The Ethiopian acquisition was likely to heighten the dispute.
The Djibouti government accused DP-World of funding an exiled opposition leader and businessman
Lost its access
Early this year, Ethiopia acquired a share of Port Berbera from Somaliland, along with UAE, DP-World and the Somaliland government.
The agreement has been opposed by Mogadishu, but both Ethiopia and UAE have strongly defended the deal.
Ethiopia, with an estimated 100 million population, lost its access to the sea after Eritrea seceded in 1991.
Apart from Djibouti, Ethiopia also uses Port Sudan and Port Berbera for its import and export activities.
Ethiopia and Djibouti are connected by a railway and a Liquefied Natural Gas (LNG) pipeline project was underway to export gas from the Somali region.