Mr. Pompeo refused, saying the American mission in Iraq was to train Iraqi forces to fight the Islamic State, and “we’re going to continue that mission.”

The State Department said that the United States would only be willing to discuss “appropriate force posture in the Middle East.”

Despite the Iraqi government’s moves toward expelling the Americans, some Iraqi security officials have opposed the idea, saying they were needed to help fight the remnants of the Islamic State and prevent its resurgence, as well as to support coalition troops from other countries.

If the Americans and most other coalition militaries left, the Iraqis could continue to fight the extremists on their own, but would likely be hampered by a lack of drone-based intelligence and air cover, according to senior coalition military officials.

The Islamic State, which a few years ago controlled a large part of Iraq, no longer controls territory there but remains active in some pockets and claims a few Iraqi lives almost every week.

Removing the United States military from Iraq would take more than a vote in Parliament. According to American officials, it would require the Iraqi government to annul the agreements it has made allowing the American and coalition forces to train, advise and assist in the fight against the Islamic State.

The American-led military coalition in Iraq suspended its counterterrorism mission on Jan. 5, two days after an American MQ-9 Reaper drone fired missiles into a convoy at the Baghdad airport, killing the Iranian commander, Maj. Gen. Qassim Suleimani; Abu Mahdi al-Muhandis, the deputy chief of a coalition of Iraqi militias; and eight other people.