FILE PHOTO: Eritrea's President Isaias Afwerki (L) walks besides the Somalia's President Mohamed Abdullahi Mohamed during a welcoming ceremony upon his arrival for a three-day visit to Eritrea, in Asmara, Eritrea July 28, 2018. Courtesy of the office of President of the Republic of Somalia/Handout via REUTERS

NAIROBI (Reuters) - Eritrea and Somalia plan to establish diplomatic relations, their presidents said on Monday, the latest sign of thawing relations across the Horn of Africa following Eritrea’s rapprochement with Ethiopia.

Somali President Mohamed Abdullahi arrived in Eritrea’s capital Asmara on Saturday for meetings with President Isaias Afwerki.

“The two countries will establish diplomatic relations and exchange ambassadors, promote bilateral trade and investment, as well as educational and cultural exchanges,” the two leaders said in a joint statement.

The decision by Isaias to invite Abdullahi marked a new chapter for the countries after years of sour relations, reflecting how regional politics have been transformed since a new Ethiopian leader reached out to Eritrea this year.

Past Somali administrations had accused Eritrea of supplying weapons to anti-government Islamist insurgents. Asmara has repeatedly denied this, saying the accusations were concocted by its enemy Ethiopia.

In 2007, Eritrea even walked out of the East African bloc IGAD in protest as Ethiopian forces entered Somalia to fight militants.

Eritrea and Ethiopia staged a dramatic rapprochement in recent weeks, after Prime Minister Abiy Ahmed took power in Addis Ababa in April and subsequently announced that he wanted to implement a peace deal that ended their 1998-2000 border war.

Eritrea and Ethiopia signed an agreement earlier this month to restore ties, ending two decades of hostility.