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.
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
A peace deal ending the border war, in which more than 70,000 people died, was signed in December 2000. However, Ethiopia refused to accept the final ruling of a border commission two years later, which awarded disputed territory to Eritrea, including the town of Badme.
A "no war, no peace" situation had existed between the two countries since then.
Monday's declaration, which follows a visit to the Ethiopian capital, Addis Ababa, by Eritrean diplomats, comes after Mr Abiy said his country would accept the commission's ruling.
This diplomatic initiative is the latest in a series of changes introduced by the Ethiopian prime minister since he came into office in April. Before then, it was unthinkable for Ethiopia to accept that Badme, the flashpoint for the conflict, was part of Eritrea.