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.
- Africa Live: More on this and other African news
- The story behind Africa’s unfinished war
- Brothers at war in the Horn of Africa
- Is this the man to change Ethiopia?
Why is this such a big deal?
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 backed 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.
The idea that Ethiopia would alter its position was unthinkable until recently. But things have changed very fast since Abiy Ahmed became prime minister of Africa’s second most populous nation in April.
As well as his overtures to Eritrea, Mr Abiy has lifted a state of emergency, freed political prisoners and announced economic reforms.
What are people saying about it?
Mr Abiy’s surprise visit to Asmara, that began on Sunday, was hailed as historic.
Asmara resident Mela Gebre Medhin said on Twitter that she had “goosebumps” thinking about what happened.
She also posted pictures on her Facebook page showing people turning out to greet the Ethiopian prime minister
Others have been tweeting about the mood of “total jubilation”.
What did the leaders say?
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”.
What else has been agreed?
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.
It also means that Ethiopia, which became landlocked when Eritrea became independent in 1991, will once be able to use Eritrea’s ports on the Red Sea.
The leaders also agreed to “work together to guarantee regional peace, development and cooperation”, according to Mr Yemane.
What has to happen now?
While this has opened the door for peace there is still a “long way to go to achieve lasting peace”, Asmara resident Ms Mela told the BBC.
The key question is what will happen at the border.
In June, there were protests in Ethiopia near the border when the prime minister first said that Badme could become part of Eritrea.
The BBC’s Emmanuel Igunza in Ethiopia’s capital, Addis Ababa says it is not clear when Ethiopian troops will withdraw from the disputed territories.
Ethiopia’s Abiy and Eritrea’s Afewerki declare end of war