The presidents of Djibouti and Eritrea have met for the first time in more than a decade.
At a summit in Saudi Arabia, Presidents Ismail Omar Guelleh and Isaias Afwerki agreed on a new chapter of cooperation.
There has been a long-standing border dispute between the two countries, which has occasionally erupted into violence.
The United Nations Secretary General Antonia Guterres said he hoped the agreement would lead to great stability in the Horn of Africa.
There has been significant change in the region, mainly spearheaded by Ethiopian Prime Minister Abiy Ahmed, who came to power in April.