"The foreign ministry has decided to summon the Turkish ambassador in Baghdad to hand him a formal protest note regarding recent remarks by the Turkish president on the Hashed al-Shaabi (Popular Mobilisation)," ministry spokesman Ahmad Jamal said in a statement.
In an interview to the Doha-based Al-Jazeera channel, whose Baghdad office was shut down last year, Erdogan spoke of the Hashed al-Shaabi, which has played a key role in the fight against the Islamic State group.
Fateh Yildiz started to serve as Turkish ambassador to Iraq in January this year.
The Hashed al-Shaabi is an umbrella of armed groups dominated by Shiite militia loyal to Iran.
More From This Section
Turkey is keen to retain its influence in parts of northern Iraq and the Hashed al-Shaabi has ventured ever further north in recent months, raising concerns that Iran and Turkey could clash via their proxies.
Iraqi Prime Minister Haider al-Abadi has been under intense pressure from his own camp over the continued presence in northern Iraq of Turkish military bases.
For its part, Ankara wants tougher action against the Turkish separatist Kurdistan Workers Party (PKK), which it considers a terrorist organisation and which has bases in northern Iraq.