Iraqi Prime Minister Haidar al-Abadi has warned Turkey against provoking a confrontation after Ankara sent tanks and artillery near the countries' border not far from Mosul.
Abadi said in a televised news conference that Baghdad does not want a confrontation or a "war with Turkey," but said Iraqi forces "are ready for it" if it happens.
He added that Baghdad had prohibited Turkish forces from intervening in the fight against Islamic State (IS) fighters to regain control of Mosul and if "Turkey enters the current battle...we will deal with them as an enemy."
Turkey has deployed tanks and heavy artillery on its southeastern border with Iraq, saying that the forces may be sent into Iraq "if necessary."
The deployments on November 1 were made in Turkey's Silopi region bordering a stretch of northern Iraq along Iraq's strategic Highway 2, which leads to Mosul about 130 kilometers to the south.
Turkish Defense Minister Fikri Isik said on November 1 that Ankara was under no obligation to keep its military forces on its own side of the border.
Foreign Minister Mevlut Cavusoglu said on October 25 that Ankara could launch a ground operation into Iraq if it felt its security was threatened. "We are ready to use all our resources, including a ground operation," he said.
The deployments came as Iraqi special forces battled Islamic State (IS) militants into an eastern neighborhood of Mosul on November 1 -- the first time government forces have been inside the city since it was seized by IS militants in 2014.
It also came as the head of the Turkish Armed Forces General Staff, General Hulusi Akar, was visiting Moscow on November 1 for talks with his Russian counterpart, General Valery Gerasimov, about possible military cooperation and what Ankara described as "the situation in the Middle East."
Turkey has as many as 1,000 troops in northern Iraq at the request of regional Iraqi Kurdish leaders, and have been training Kurdish Peshmerga fighters.
But the government in Baghdad has called on Turkey to withdraw those forces.
Turkey has not had a direct role in a two-week-old Iraqi operation to recapture Mosul from IS fighters.
But Ankara has said its forces should be involved to prevent Iranian-backed Shi'ite militia fighters from abusing the rights of Sunni civilians to the west of Mosul -- particularly ethnic Turkomans in the city of Tal Afar, who adhere to a Turkish cultural heritage and identity.
At the same time that Turkey has been helping Iraqi Kurdish forces, it has been fighting against U.S.-supported Syrian Kurds from the so-called Kurdish People's Protection units (YPG) -- claiming that the YPG in Syria is associated with Turkish Kurds from the outlawed Kurdistan Workers Party (PKK).
Turkey has been battling PKK militants in southeastern Turkey for more than 30 years in a conflict that has killed tens of thousands.
With reporting by Reuters, AP, AFP, dpa, and CNN Turk