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.
Family members divided by the dispute are now able to telephone each other for the first time since the war.
Ethiopian journalist Shishay Wores was contacted by his sister in Eritrea.
"For a moment my heart stopped beating, my voice was shaking and I was struggling for words. It took me a while to calm down and talk to my sister."
The declaration came at a landmark meeting between the two countries' leaders in Eritrea's capital, Asmara.
The summit between Eritrea's President Isaias Afwerki and Ethiopia's Prime Minister Abiy Ahmed marked the first time the neighbours' heads of state had met for nearly two decades.
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 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, 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.
An amazing day, I still have goosebumps remembering it. This is History in the making. The doors towards peace are finally opening up. A new chapter begins for the people of both countries and the region as a whole. #vision #peace #prosperity #HoA #Eritrea #Ethiopia #HornofAfrica pic.twitter.com/1lCx0td3Ea— Mela G/Medhin (@Ertrawit) July 9, 2018
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.
Joint Declaration states, inter alia, i) State of war that existed between the two countries has come to an end. A new era of peace & friendship has been ushered; ii) Both countries will work to promote close cooperation in political, economic, social, cultural & security areas pic.twitter.com/B9arIZnsxa— Yemane G. Meskel (@hawelti) July 9, 2018
Mr Abiy's chief of staff, Fitsum Arega, tweeted that the two countries "are determined to close a costly chapter".
#Ethiopia & #Eritrea are determined to close a costly chapter and eager to make up for lost opportunities putting the interest and aspirations of their people at the center. Upon the conclusion of HE PM Dr Abiy Ahmed visit in Asmara, the two parties agreed the following. 1/2— Fitsum Arega (@fitsumaregaa) July 9, 2018
1)State of war has come to an end;2)The 2 nations will forge close political,economic,social,cultural & security cooperation 3)Trade, economic&diplomatic ties will resume,4)The boundary decision will be implemented,5)Both nations will work on regional peace #Ethiopia #Eritrea 2/2— Fitsum Arega (@fitsumaregaa) July 9, 2018
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. Flights could resume as early as next week, Ethiopian state-affiliated outlet FBC reports.
For the last 20 years, it has been impossible to travel directly from one nation to the other. There have been no flights, the land border was closed, and telephone lines did not work.
This raises the possibility that families who have been divided by the conflict could finally be reunited.
The changes also mean that Ethiopia, which became landlocked when Eritrea became independent in 1993, will once be able to use Eritrea's ports on the Red Sea.
It is particularly significant that the meeting took place in Eritrea, rather than a neutral venue, as the country has been closed to Ethiopians for most of the past two decades, says BBC Tigrinya editor Samuel Ghebrehiwet,
The leaders also agreed to "work together to guarantee regional peace, development and cooperation", according to Mr Yemane.
What are other leaders saying?
The thawing of relations between Ethiopia and Eritrea has been welcomed in the region, especially as there were fears that the border tension could erupt into full-scale war.
Uhuru Kenyatta, president of Ethiopia's neighbour, Kenya, congratulated the two leaders on Twitter adding that "we are together with you".
Rwandan President Paul Kagame, the current chairperson the African Union, praised their courage, saying on Twitter that they were "doing the right thing for their people".
United Nations' secretary general Antonio Guterres, who is on a visit to Ethiopia's capital, Addis Ababa, said the recent developments show a new wind of hope is blowing across Africa.
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 hinted 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.