(AFP) -- NATO forces are staying in Iraq at the country's request, alliance chief Jens Stoltenberg said during a rare visit Monday to Baghdad after parliament called for a foreign troop pullout.
"We are here because Iraq wants us to be here, we are not here without the consent and without an invitation from Iraq," Stoltenberg told AFP.
"We should not stay longer than necessary, we will train the trainers as long as necessary to make sure IS does not reemerge," he said of the jihadist Islamic State group.
His comments come days after the Iraqi parliament called for the government to draw up a timetable for the withdrawal of foreign troops from the country.
"The Iraqi parliament expresses its gratitude to all countries which have supported Iraq in its fight against Daesh (IS) and calls for the government to draw up a timetable for the withdrawal of foreign troops," it said in a statement.
Iraqi Prime Minister Haider al-Abadi declared in December the end of the war to expel IS jihadists from the country, three years after they seized a third of Iraq, sweeping aside security forces.
Stoltenberg said NATO received a "written request" from Abadi to keep its troops in the country.
He said troops from 19 member countries have stepped up training Iraqi forces in several fields.
NATO "is scaling up its training, like countering IEDs (improvised explosive devices), military medicine, maintenance of equipment and in some other areas", he said.
"We are also planning to help Iraqis to establish military schools and academies to educate their trainers to improve its capacity to form its own trainers," Stoltenberg said.
In addition, NATO will work with Iraq "on institutional reform, including fighting corruption", he added.
He also praised the "enormous transformation" of Iraqi forces since 2014, when IS launched its lightening offensive and seized swathes of territory.
"The Iraqi forces in 2014 are totally different from the Iraqi forces in 2018, there was an enormous transformation," the NATO chief said.