US President Donald Trump said the US was prepared to act if Iran intervened in Iraq, despite a dwindling US troop presence in the country.
Sitting with visiting Iraqi Prime Minister Mustafa Al Kadhimi at the White House, Mr Trump said he expected US troops to leave "at some point" but expressed his support for Iraq against Iranian interference.
"We have very few soldiers in Iraq but we are there to help if Iran should do anything," he said.
Mr Trump said that as far as future US troop levels were concerned: "We look forward to the day when we don't have to be there."
He said the two leaders would discuss military matters and oil production in a two-hour meeting on Thursday.
A US senior official on Wednesday said no timeline for a withdrawal of troops from Iraq would be discussed in the visit but the troops' role would be.
Mr Al Kadhimi thanked his host on Twitter after the meeting, saying Iraq would "continue to work on defeating the remnants of ISIS and develop joint projects to improve our economic ties".
"We thank President Trump and our US friends in helping us free Iraq from the scourge of terrorism," he said.
Mr Al Kadhimi, who arrived in the US on Wednesday, is the most senior Iraqi visit to the White House since 2017.
He condemned Turkish intervention in the north of his nation and said he hoped the issue could be resolved.
Turkey, which has had a military presence in Iraq's autonomous region for a quarter of a century, launched a cross-border operation against the Kurdistan Workers' Party, or PKK, in the mountainous region in mid-June.
"Turkish interference is rejected," Mr Al Kadhimi said.
"The Iraqi constitution does not allow Iraq to be a threat to any neighbouring country. We are entering dialogue with Turkey and hope for a resolution."
Mr Trump praised the Iraqi leader.
"We are working with Iraq. We developed very good relations with this gentleman," he said.
Mr Al Kadhimi's visit has been as much about business as politics
He said Iraq was open to American business and investment, and that economic relations with the US would improve the future for the Iraqi people.
He spent Wednesday meeting Secretary of State Mike Pompeo and US business leaders, and signed preliminary agreements worth more than $8 billion (Dh29.39bn) in several areas, mainly energy.