President Trump has threatened severe sanctions against Iraq after its parliament called on US troops to leave the country.
"We have a very extraordinarily expensive air base that's there. It cost billions of dollars to build. We're not leaving unless they pay us back for it," he told reporters.
Tensions are high after the US assassinated Iranian General Qasem Soleimani in Baghdad last week.
Iran has vowed "severe revenge".
Soleimani, 62, spearheaded Iranian military operations in the Middle East, and was regarded as a terrorist by the US.
The general's remains have now returned to his home country, where mourners packed the streets of Tehran early on Monday.
Who was Iran's Qasem Soleimani?
The new head of Iran's Quds force - which Soleimani led - has vowed to expel the US from the Middle East.
"We promise to continue martyr Soleimani's path with the same force... and the only compensation for us would be to remove America from the region," state radio quoted Esmail Qaani as saying.
The strike that killed Soleimani also claimed the life of Abu Mahdi al-Muhandis, a top Iraqi military figure who commanded the Iranian-backed Kataib Hezbollah group.
What did Trump threaten Iraq with?
Speaking from the presidential plane, Mr Trump said that if Iraq asked US forces to depart on an unfriendly basis, "we will charge them sanctions like they've never seen before, ever. It'll make Iranian sanctions look somewhat tame."
Some 5,000 US soldiers are in Iraq as part of the international coalition against the Islamic State (IS) group.
On Sunday, the coalition paused its operations against IS in Iraq, and Iraqi MPs passed a non-binding resolution calling for foreign troops to leave.
Iraqi MPs back call to expel US troops
The resolution was pushed through by the parliament's Shia Muslim bloc - which is close to Iran.
How has Iran responded to the US?
Iran has announced it will no longer abide by restrictions imposed by the 2015 nuclear deal, under which it agreed to limit its sensitive nuclear activities and allow in international inspectors in return for the lifting of economic sanctions.
Iran rolls back nuclear deal commitments
Iran nuclear deal: Key details
Iran's response options for Soleimani's death
US President Donald Trump abandoned the deal in 2018, saying he wanted to force Iran to negotiate a new deal that would place indefinite curbs on its nuclear programme and also halt its development of ballistic missiles.