Eritrea will pull its troops out of the Tigray region, Ethiopia's prime minister Abiy Ahmed has said.
The soldiers have been supporting Ethiopia's government forces in its protracted conflict against the Tigray People's Liberation Front (TPLF) - the regional ruling party.
Under growing international pressure to address reports of human rights abuses during the conflict, Mr Ahmed said on Twitter: "Eritrea has agreed to withdraw its forces out of the Ethiopian border."
He issued the statement during a visit to Eritrea's capital, Asmara, for talks with President Isaias Afwerki.
Eritrea, whose government has not acknowledged its troops are in Tigray, has not yet confirmed the withdrawal.
Mr Ahmed confirmed on Tuesday that troops from Eritrea had entered Tigray during the conflict, the first such acknowledgement after months of denials.
He told parliament Eritrean troops had crossed into Tigray because they feared an attack by TPLF forces, adding that the soldiers had said they would leave when Ethiopia's military was able to control the border.
The PM also acknowledged there had been atrocities such as rape during the conflict.
Last month the US accused the Ethiopian government of waging a systematic campaign of ethnic cleansing - destroying villages and making thousands of people homeless.
Tens of thousands have fled Tigray into Sudan since early November, with the United Nations (UN) predicting 200,000 will have fled within six months.
In November, the UN said 6,000 refugees were entering Sudan every day, with more than 60,000 having crossed over so far.
US President Joe Biden sent Senator Chris Coons as an emissary to Ethiopia this week, who has said he is optimistic there will be humanitarian access to the region soon.