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-2000 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.
The two countries have been in a state of “no war, no peace” since 2000, when a peace deal ended a war in which tens of thousands of people were killed.
A border commission set up under the peace agreement ruled that the town of Badme, the flashpoint for the conflict, was part of Eritrea but Ethiopia refused to accept this and so normal relations were never resumed.
The rivalry affected the whole region with each country normally taking opposite positions whatever the question. They also took rival sides in Somalia’s long conflict – Eritrea was accused of backing Islamist groups, while Ethiopia, a US ally, supported the internationally recognised government.
Until now, Eritrea has always said that war could resume at any time and so had national conscription, which could last indefinitely. This is one of the main reasons why so many Eritreans try to leave the country and seek asylum elsewhere.
When Abiy Ahmed took over as prime minister of Ethiopia three months ago, he indicated that change could be on the cards but few imagined it could happen this quickly, says BBC Tigrinya editor Samuel Ghebrehiwet,
As well as his overtures to Eritrea, Abiy has lifted a state of emergency, freed political prisoners and announced economic reforms.