RNA - Sa'ad al-Hadithi, the spokesman for Iraqi Prime Minister Haider al-Abadi's office, said on Tuesday that the "irresponsible statements by [the] Turkish president could pour oil on fire and fuel further tensions."
The Iraqi official added that Ankara was not serious about resolving a dispute over Turkey's deployment of troops in Iraq.
Hadithi said Abadi had already warned the Turkish government that violating Iraq's sovereignty would have "serious consequences" for the stability of both countries.
He said Baghdad sought to avoid a war of words with Ankara.
Hadithi made the remarks shortly after Erdogan said the Turkish army would not take orders from Iraq to leave the country.
"Who's that? The Iraqi prime minister. First you know your place!" Erdogan said in comments addressed to Abadi.
"He is insulting me personally. You are not my interlocutor, you are not at my level," the Turkish president told a meeting in Istanbul, adding, "It's not important at all how you shout from Iraq. You should know that we will do what we want to do."
The Iraqi Foreign Ministry recently called for an emergency meeting of the UN Security Council over the presence of the Turkish troops in Iraq as well as a decision by the Turkish parliament to extend the deployment by another year.
The Iraqi Foreign Ministry summoned Turkish Ambassador to Baghdad Faruk Kaymakci over the extension on October 5.
The Turkish Foreign Ministry also summoned Iraq's Ambassador to Ankara Hisham Ali Akbar Ibrahim Alawi in a tit-for-tat move.
Abadi said at a news conference in Karbala on October 9 that they were "impeding" efforts to fight the Daesh Takfiri terrorists.
"There is no place for the presence of Turkish forپذیرشces on the Iraqi territory at the moment, because we are busy fighting Daesh and the presence of the Turkish forces impedes our efforts to fight" the terrorist group, the Iraqi prime minister said.
Abadi had earlier said his country did not "want to enter into a military confrontation with Turkey" and that the "behavior of the Turkish leadership is not acceptable by any standard."
The Iraqi army and pro-government forces have been preparing for months to liberate the northern city of Mosul, which has been under the control of Daesh since 2014.