For the first time since a brutal border war in the late 1990s left a violent rift between Ethiopia and Eritrea, leaders of the two nations embraced on an airport tarmac on Sunday, hinting at a new era for the two countries.

Ethiopia’s prime minister, Abiy Ahmed, led his country’s first state visit to Eritrea since the war broke out in 1998 and sat for a meeting in Eritrea’s capital, Asmara, with President Isaias Afwerki.

At a state dinner on Sunday evening, Mr. Abiy announced that he had agreed with the Eritrean president to “resume the services of our airlines, to get our ports working, to get our people to trade and to open our embassies again.”

Direct telephone lines had been restored between the two countries on Sunday afternoon for the first time in two decades.