US Secretary of State Rex Tillerson has said Iran-backed militias who have been fighting the so-called Islamic State (IS) group in Iraq should go home as the battle is nearing its end.
Mr Tillerson said all foreign fighters should leave and let Iraqis rebuild.
He was speaking during a visit to Saudi Arabia partly aimed at curbing Iran's influence in the region.
His trip follows President Donald Trump's announcement of a more confrontational approach to Tehran.
The US and its allies have been fighting the same enemy as the Iranians in the same theatre of war, despite Washington's opposition to their presence.
US-backed Iraqi government forces have been fighting IS alongside Popular Mobilisation Units (PMU), a coalition of mostly Shia militia, many backed and funded by Iran.
Some PMUs have been accused of abuses against Sunni civilians, including torture and killings, during previous operations to regain territory from IS in Iraq.
PMU militia were also involved in last week's Iraqi government takeover of large areas held by the Kurds since 2014, when IS swept through northern Iraq amid an Iraqi army collapse.
Mr Tillerson wants Iraqi Shias in these militias either to integrate into the Iraqi army or put down their arms, a US official told the BBC. Their Iranian backers should leave the country, the official said.
He was attending the inauguration of a new joint body established by Iraq and Saudi Arabia to co-ordinate economic development and counter-terrorism activities.
Mr Tillerson said it would help Iraq stand on its own feet after the battle against IS, and help counter some of Iran's influence in the country.
The secretary of state travelled on to Qatar following his Saudi visit.
He had hoped to broker a resolution to Qatar's bitter five-month diplomatic and trade dispute with Saudi Arabia and its allies, but such hopes appear to have been dashed.
"There is not a strong indication that the parties are ready to talk yet," Mr Tillerson said following negotiations on Sunday in Riyadh with Saudi Crown Prince Mohammed bin Salman.