Turkish President Recep Tayyip Erdogan says his country is determined to take part in a possible operation to recapture the Iraqi city of Mosul despite objections from Iraq, adding to tensions between the two neighbors.

Erdogan on Tuesday also said Turkish troops would not withdraw from a base near Mosul, saying the Turkish army would not take orders from Baghdad. Turkey is training anti-IS fighters to help retake Mosul from the Islamic State group.

Tensions between Ankara and Baghdad rose last week over the presence of Turkish troops in northern Iraq and over Turkish warnings of sectarian clashes in Mosul if the majority Sunni region were placed under Shiite militia control.

Addressing the Iraqi prime minister, Erdogan said: "Know your place! You screaming and shouting is of no importance to us."