BAGHDAD (Reuters) - Iraq likes what U.S. troops are doing there, President Donald Trump said on Wednesday at talks with the Iraqi president about the future of the mission, which has been in doubt since a U.S. drone strike killed an Iranian commander in Baghdad.

Iraqi President Barham Salih’s office said he and Trump had discussed reducing the number of foreign troops in Iraq at a meeting on the sidelines of an economic summit in Davos, Switzerland.

Asked before the meeting about the prospect of a U.S. withdrawal, Trump said: “We’re talking about a lot of different things and you’ll be hearing whatever we do. But they like what we’re doing and we like them, and we’ve had a very good relationship.”

The United States has around 5,000 troops in Iraq, invited back into the country in 2014 by Baghdad to help fight against the Islamic State militant group.

But the fate of the mission has been in question since Jan. 3, when Trump ordered a drone strike at Baghdad airport that killed Qassem Soleimani, the most prominent military commander of Iraq’s neighbor Iran. The Iraqi commander of a powerful pro-Iran militia was also killed.

Iraq’s parliament responded with a non-binding vote to demand the U.S. forces leave, prompting an angry Trump at one point to threaten to impose sanctions on Iraq unless it allows U.S. troops to stay.

Trump struck a more conciliatory tone on Wednesday, noting also that the U.S. presence was much smaller than during the 2003-2011 U.S. occupation that followed an invasion that toppled dictator Saddam Hussein.

Slideshow ( 2 images )

“We’re down to 5,000 so we’re down to a very low number -- historically low -- and we’ll see what happens.”

SANCTIONS

Asked about his earlier threat to impose sanctions on Iraq, Trump said: “We’ll see what happens, because we do have to do things on our terms.”

Salih’s office said in a statement: “During the meeting, reducing foreign troops and the importance of respecting the demands of Iraqi people to preserve the country’s sovereignty were discussed.”

Iraq’s government has long had to balance its close relations with both Washington and Tehran, which sponsors powerful Shi’ite armed groups and political factions hostile to the United States.

Maintaining that balance became trickier for Baghdad after an escalation that began last month with rockets fired at a U.S. base in Iraq, killing an American contractor, and reached its peak with the drone strike that killed Soleimani.

Tehran responded with a ballistic missile attack on two Iraqi military bases housing U.S. forces on Jan. 8, for now the final shot in the tit-for-tat escalation.

Iraqi Prime Minister Adel Abdul Mahdi asked Washington to prepare for a U.S. troop withdrawal in line with the request by Iraq’s parliament, but Trump’s administration has so far rebuffed the call to withdraw.

Washington has said it is exploring a possible expansion of NATO’s mission in Iraq, a plan to “get burden-sharing right in the region”.