Defense Department chief Patrick Shanahan made his case for a continued U.S. military presence in Iraq, despite growing opposition in Baghdad to keeping American troops in country long-term.

Mr. Shanahan met with Iraqi Council of Representatives Speaker Mohammed al-Halbousi at the Pentagon Wednesday to discuss the U.S. deployment in the country and the need to continue to confront Islamic State and other extremist groups.

“The leaders agreed that the U.S.-Iraq security partnership makes us all safer — Iraqis, Americans, and regional allies alike. They also agreed on the value of the international Coalition to Defeat ISIS and the need for continued coalition support to Iraq,” according to a readout of the meeting provided by the Pentagon.

The meeting comes as some Iraqi lawmakers step up their campaign to remove all foreign forces from the country in the wake of the Islamic State’s battlefield defeat in the region.

Earlier this month. members of the Iraqi Parliament’s Defense and Security Committee announced plans to hold a vote on whether to end the bilateral agreement between Baghdad and Washington, the deal allowing U.S. forces to remain in Iraq.

Roughly 5,000 U.S. troops are stationed in Iraq under a limited bilateral military agreement with Baghdad, to battle Islamic State elements based in the country.

Committee members cited in part Mr. Trump’s recent demands that U.S. allies pay more for the American troops who help defend them, warning that “Iraq will not become a milk cow for the U.S.,” Iraqi News Network reported.

The plan reportedly requires host nations to finance all costs tied to U.S. military deployments, plus 50 percent of that total cost as a pseudo-tax for having American troops on their soil.

President Trump also riled Iraqi officials in December when he said he wanted to keep U.S. forces in Iraq not to defend the country but to keep an eye on neighboring Iran.