The leaders of Ethiopia and Eritrea have signed a declaration saying that the state of war between the two countries is over.
A peace deal ending the 1998-1999 border conflict has never been fully implemented and there has been tension between the neighbours ever since.
The countries have also agreed to re-establish trade and diplomatic ties.
The declaration came at a landmark meeting between the two countries' leaders in Eritrea's capital, Asmara.
The summit between Eritrea's President Isaias Afewerki and Ethiopia's Prime Minister Abiy Ahmed marked the first time the neighbours' heads of state had met for nearly two decades.
A peace deal signed in 2000 established a border commission that went on to rule that the town of Badme, the flashpoint for the conflict, was part of Eritrea. Ethiopia's refusal to accept this meant that normal relations were never resumed and the two countries were in a state of "no war, no peace".
The idea that Ethiopia would alter its position was unthinkable until recently. But things have changed very fast since Abiy Ahmed became prime minister in April.
On Monday, the leaders agreed that "a new era of peace & friendship has been ushered [in]", Eritrea's Information Minister Yemane Gebre Meskel said on Twitter.
Mr. Abiy's chief of staff, Fitsum Arega, tweeted that the two countries "are determined to close a costly chapter".
The two leaders said the countries would improve political, economic and diplomatic ties.
Transport and telephone links will also be re-established.
This raises the possibility that families who have been divided by the conflict could finally be reunited.
The leaders also agreed to "work together to guarantee regional peace, development and cooperation", according to Mr. Yemane.