Iraqi Prime Minister Haider al-Abadi has said he received assurances during talks with President Donald Trump and his administration of increasing American support as he presses his country's campaign against ISIL.

"We have been given assurances that the [US] support will not only continue but will accelerate for Iraq to accomplish the task," Abadi said following talks with Trump at the White House on Monday.

In a meeting on the 14th anniversary of the US invasion, Trump questioned whether the United States should have pulled combat troops out of the country.

"We should never ever have left," he said, after previously having supported the withdrawal.

Trump told Abadi that he knew Iraqi forces were fighting hard against ISIL.

"It's not an easy job," Trump said. "It's a very tough job. Your soldiers are fighting hard. I know Mosul is moving along.

"We will figure something out. I mean we have to get rid of ISIS," he added, using an alternate acronym for the Islamic State of Iraq and the Levant group. "We're going to get rid of ISIS. It will happen. It's happening right now."

OPINION: ISIL after Mosul - Insurgency and rivalry

The Iraqi authorities launched an offensive in October to retake the northern city of Mosul from ISIL with the support of US-led coalition air strikes.

Government forces retook the east side of Mosul in January before setting their sights on the more densely populated west of the city, the last major urban centre ISIL holds in Iraq.

Currently, there are almost 5,000 US troops assisting coalition forces, providing air power, training and advice. That is down from a peak of more than 170,000 in 2007.

Speaking at the United States Institute of Peace later on Monday, Abadi said that the Trump administration has a greater desire to be more engaged in the fight against "terrorism" than its predecessor.

But he cautioned that the fight cannot be won solely with military action.

"There are better ways" to defeat ISIL than military might alone, Abadi said.

"We have to be careful here," he said. "We are not talking about military confrontation [alone]. Committing troops is one thing, while fighting terrorism is another thing. You don't defeat terrorism by fighting it militarily."

Abadi also thanked Trump for removing Iraq from a travel ban affecting several Muslim-majority countries.

After an appeal from Abadi, Trump decided this month's revised order would not include Iraq because of its cooperation with the US. Both the initial January 27 travel ban and the revised version have been blocked by federal courts.

"I thank you for removing Iraq from the presidential order ... this was a positive response to the Iraqi request that betters the relationship with Iraq and the value of Iraq as far as Iraqi-American relations," Abadi told Trump.