Updated

Eritrea and Somalia have agreed to restore diplomatic relations, an official said Monday, in another thaw in the restive Horn of Africa region.

Eritrea's information minister announced the agreement on Twitter as Somalia's president ended a historic three-day visit to one of the world's most closed-off nations. There was no immediate comment from Somalia's government.

The countries have not had diplomatic ties for nearly 15 years. Eritrea remains under United Nations sanctions for allegedly supporting the Somalia-based al-Shabab extremist group. Eritrea denies it.

"Eritrea & Somalia will work in unison to foster regional peace, stability & economic integration," information minister Yemane Meskel said. He added: "Eritrea strongly supports the political independence, sovereignty & territorial integrity of Somalia."

The visit by Somalia's President Mohamed Abdullahi Mohamed, at the invitation of longtime President Isaias Afwerki, follows a stunning diplomatic thaw between Eritrea and neighboring Ethiopia after more than two decades. Ethiopia under reformist new Prime Minister Abiy Ahmed has asked that the sanctions on Eritrea be dropped.

The U.N. chief has indicated the sanctions could be obsolete.

The changing relations in the Horn of Africa region are of interest to the wealthy Gulf states just across the Gulf of Aden and the Red Sea. Already they have been jostling for influence in the African nations along one of the world's busiest shipping lanes, including both Somalia and Eritrea. Landlocked Ethiopia also eyes both countries' ports as outlets for its fast-growing economy.

Somalia remains fragile under the threat of al-Shabab, which holds some rural areas and often carries out high-profile suicide bombings in the capital, Mogadishu. A truck bombing in October killed more than 500 people in the deadliest attack in the country's history.

___

Follow Africa news at https://twitter.com/AP_Africa