The African Union on Thursday urged Ethiopia and Somalia to implement "without delay" a breakthrough agreement aimed at ending tensions between the neighbours over Ethiopia's access to the sea and called the deal an "important act".

The two countries have been at loggerheads since landlocked Ethiopia struck a deal in January with Somalia's breakaway region Somaliland to lease a stretch of coastline for a port and military base.

In return, Somaliland -- which unilaterally declared independence from Somalia in 1991 in a move not recognised by Mogadishu -- said Ethiopia would give it formal recognition, although this was never confirmed by Addis Ababa.

Somalia branded the deal a violation of its sovereignty, setting international alarm bells ringing over the risk of renewed conflict in the volatile region.

Following hours of Turkish-brokered talks, Ankara announced late Wednesday an "historic" agreement had been reached between Somalia and Ethiopia.

Details of the deal remain scarce, but Turkish President Recep Tayyip Erdogan said he believed the agreement would ensure Ethiopia's long-desired access to the sea.

Ethiopian Prime Minister Abiy Ahmed and Somali President Hassan Sheikh Mohamud had flown into Ankara for the talks following two previous rounds that made little progress.

African Union Commission Chairman Moussa Faki Mahamat stressed the "important act" taken by the leaders to find a deal but emphasised the urgency to "implement, without delay, the relevant measures adopted".

He did not give any indication in the statement, posted on X, of what measures had been agreed.

East Africa's regional bloc IGAD (the Intergovernmental Authority on Development) also welcomed the agreement as an "important step".

It "demonstrates a commitment to resolving bilateral issues amicably", IGAD Executive Secretary Workneh Gebeyehu said.

- 'Reliable, safe access' -

According to the text of the agreement published by Turkey, the parties agreed "to put aside differences of opinion and contentious issues, and to move resolutely forward in cooperation towards common prosperity".

They agreed to work closely together on commercial arrangements and bilateral agreements that would ensure Ethiopia's "reliable, safe and sustainable access" to the sea "under the sovereign authority of the Federal Republic of Somalia".

To that end, it said they would start technical talks no later than the end of February which would be completed "within four months", with any differences to be dealt with "though dialogue, where necessary with Turkey's support".

However, there was no detail on how the agreement might impact the controversial memorandum of understanding between Somaliland and Ethiopia, which has never been made public.

Ethiopian authorities did not immediately respond to AFP's requests for comment about the future of the agreement with Somaliland.

While Abiy has repeatedly insisted that his country must have coastal access, he told parliament earlier this year that Ethiopia had "no interest in getting involved in a war" over access to the sea.

In response, Mogadishu has strengthened its ties with Egypt, Ethiopia's long-time rival.

Somalia expelled Ethiopia's ambassador in April and said Ethiopian troops would be excluded from a new African Union peacekeeping force against Islamist Al-Shabaab insurgents that is due to be deployed on January 1.

Ethiopia, which has the second largest population in Africa with 120 million people, lost access to the sea when Eritrea gained independence in 1993.