Ethiopia's prime minister has acknowledged for the first time that troops from neighbouring Eritrea have been in the Tigray region following the outbreak of conflict in November.
For months both countries have denied that troops crossed the border.
Abiy Ahmed told MPs that Eritrean forces came fearing they would be attacked by Tigray's regional fighters.
The conflict began after the Tigray People's Liberation Front (TPLF) captured military bases in the region.
The TPLF had been the ruling party in the northern Ethiopian region, but had a massive fall-out with Mr Abiy over the future of Ethiopia's ethnically based federal system and its role in government.
Hundreds of thousands of people have fled their homes in Tigray over the last five months.
Despite the TPLF being ousted from power in Tigray at the end of November and Mr Abiy declaring that the conflict was over, fighting is continuing in parts of the region.
What was Eritrea's involvement?
Mr Abiy, a former Nobel Peace Prize winner, did not admit Eritrean soldiers had been deployed in Ethiopian towns.
Rights groups allege Eritrean soldiers have committed atrocities in towns like Aksum, which include killing unarmed civilians, raping women and the widespread looting of public and private properties.
The prime minister told parliament that Eritrea had said its soldiers were acting to secure the border, taking over trenches there abandoned by Ethiopian soldiers who had gone off to fight.
He said he had spoken to Eritrean officials about allegations that soldiers from Eritrea had carried out atrocities in Tigray.
"After the Eritrean army crossed the border and was operating in Ethiopia, any damage it did to our people was unacceptable," the AFP news agency quotes him as saying.
His Twitter account added: "Reports indicate that atrocities have been committed in Tigray region.
"Regardless of the TPLF propaganda of exaggeration, any soldier responsible for raping our women and looting communities in the region will be held accountable as their mission is to protect."
Analysis: What's behind this U-turn?
By Will Ross, BBC World Service Africa editor
To many observers it has long been clear that Mr Abiy struck a deal with Eritrea's President Isaias Afwerki to combine forces and oust a common enemy - the regional TPLF government in Tigray. But to deflect criticism both capitals denied that Eritrean soldiers were inside Tigray.
Mr Abiy was describing the conflict as an internal law and order issue in a bid to stave off international criticism. He told the UN chief that Eritrean soldiers had only gone to disputed areas close to the border, which Ethiopia had already agreed to hand over.
The prime minister would also have had a tough job convincing all Ethiopians that inviting in Eritrean troops was a good idea - despite the 2018 peace agreement people still have bitter memories of the devastating border war the two countries fought from 1998 to 2000.
But with so many reports of sightings of Eritrean soldiers and unrelenting allegations of human rights abuses and looting in villages and towns, the pretence has become impossible to keep up - hence Mr Abiy's U-turn.
He chose his words carefully - never mentioning their presence in the towns of Tigray. Instead he referred to the border area - the extent of which is open to interpretation. He also quoted Eritrean officials as saying the soldiers would leave as soon as Ethiopia's army could control the trenches along the frontier.
There was another admission as a result of the growing weight of evidence. Mr Abiy also - on behalf of both countries - condemned any atrocities that had taken place. Slowly but surely the gruesome truth is coming out.
Are the atrocities being investigated?
Last week, the UN said it would work with the state-linked Ethiopian Human Rights Commission to investigate reports of the indiscriminate killing of civilians and widespread sexual abuse.
The US has described the violence in Tigray as ethnic cleansing. It has also demanded the withdrawal of Eritrean forces.
Eritrea has dismissed accusations of abuses - in particular those detailed in Aksum - as "preposterous" and "fabricated".
At the end of November, Mr Abiy had told parliament that "not a single civilian was killed" during the conflict.
A communications and electricity blackout and restricted access to Tigray has meant reports of what has gone on have been slow to emerge.