Turkey said it will stop sending troops to northern Iraq until Baghdad’s “sensitivities” over Ankara’s deployment of its forces across the Iraqi border were addressed, the Turkish prime minister’s office said Sunday. Iraq had warned Turkey that it would appeal to the United Nations if Ankara did not pull out its troops.

Turkey deployed troops to a camp in the Bashiqa region of northern Iraq last Thursday, which it said was part of a routine rotation to guide Iraqi volunteer forces to recapture Islamic State group-held Mosul city. However, Iraq accused Turkey of entering the country without the approval or knowledge of the government in Baghdad.

Earlier on Sunday, Iraqi Prime Minister Haider al-Abadi threatened Turkey saying that Baghdad “has the right to use all available options" if the troops were not withdrawn within 48 hours. Following which, Turkey assured Iraq it would not take any steps to violate Baghdad’s sovereignty or territorial harmony. 

“Our prime minister has stressed in his letter that there will be no transfer of forces to Bashiqa until the sensitivities of the Iraqi government are addressed,” Turkish Prime Minister Ahmet Davutoglu’s office said in the statement, according to Bloomberg. However, Davutoglu’s office did not specify if the troops would be withdrawn.

Last Tuesday, Iraq said that it did not need foreign troops to fight ISIS militants after the U.S. announced it would be sending special forces in Iraq to advise ground forces.

"While we welcome this support, we emphasize any such support and special operations anywhere in Iraq can only be deployed subject to the approval of the Iraqi Government and in coordination with the Iraqi forces and with full respect to Iraqi sovereignty," al-Abadi's office said at the time in a statement.