"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.
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.
[caption id="" align="alignnone" width="810"] Soleimani was seen as the second most powerful figure in Iran[/caption]
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.
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.
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.
[caption id="" align="alignnone" width="976"] Iranian MPs stood up in parliament and chanted 'death to America' for several minutes[/caption]
Iran refused and had since been gradually rolling back its commitments under the deal.
In a statement, it said it would no longer observe limitations on its capacity for enrichment, the level of enrichment, the stock of enriched material, or research and development.
The leaders of Germany, France and the UK - which were all signatories to the 2015 deal, alongside China and Russia - responded with a joint statement urging Iran to refrain from "further violent action or proliferation".
"It is crucial now to de-escalate. We call on all the players involved to show utmost restraint and responsibility," they said.
What has Trump said about Iran?
Mr Trump has vowed to strike back at Iran in the event of retaliation for Soleimani's death, "perhaps in a disproportionate manner".
He also repeated a controversial threat to target Iranian cultural sites on Sunday, despite criticism from within the US and overseas.
"They're allowed to kill our people. They're allowed to torture and maim our people. They're allowed to use roadside bombs and blow up our people. And we're not allowed to touch their cultural site? It doesn't work that way," the president said.
In a series of tweets on Saturday, Mr Trump said the US had identified 52 Iranian sites, some "at a very high level & important to Iran & the Iranian culture", and warned they would be "HIT VERY FAST AND HARD" if Tehran struck at the US.
US Senator Elizabeth Warren, a senior member of the Democratic Party, responded by tweeting: "You are threatening to commit war crimes."
Iran's Foreign Minister Mohammad Javad Zarif drew parallels with IS destruction of the Middle East's cultural riches.
"A reminder to those hallucinating about emulating ISIS war crimes by targeting our cultural heritage," he tweeted. "Through MILLENNIA of history, barbarians have come and ravaged our cities, razed our monuments and burnt our libraries. Where are they now? We're still here, & standing tall."
Targeting cultural sites is banned under the Geneva and Hague Conventions - and violating them would constitute a war crime in the US.
Iran's top cultural sites
Iran is home to two dozen Unesco World Heritage sites. These are landmarks the UN's cultural organisation believes need preserving for their cultural, historic or scientific significance. They include:
- Persepolis, the capital of the ancient Persian Achaemenid empire and whose earliest remains date back to Sixth Century BC
- Naqsh-e Jahan Square in the city of Isfahan, which was built in the early 17th Century and is is one of the largest city squares in the world
- Golestan Palace in Tehran, the residence and seat of power for the Qajar dynasty which ruled Iran from 1785 to 1925
There are also a number of sites which - while not listed by Unesco - still retain huge cultural importance. For example, the Azadi (Freedom) Tower in Tehran has been the gathering point for celebrations, military parades and mass demonstrations for almost 50 years.
Elsewhere in the city, the Mausoleum of Ruhollah Khomeini is dedicated to the Islamic Republic's founder and also houses the tombs of some of the country's leading political figures.
How soon could Iran develop a nuclear bomb?
The country has always insisted that its nuclear programme is entirely peaceful - but suspicions that it was being used to develop a bomb covertly prompted the UN Security Council, US and EU to impose crippling sanctions in 2010.
The 2015 deal was designed to constrain the programme in a verifiable way in return for sanctions relief.
It restricted Iran's enrichment of uranium, which is used to make reactor fuel but also nuclear weapons, to 3.67%. Iran was also required to redesign a heavy-water reactor being built, whose spent fuel would contain plutonium suitable for a bomb, and allow international inspections.
Before July 2015, Iran had a large stockpile of enriched uranium and almost 20,000 centrifuges, enough to create eight to 10 bombs, according to the White House at the time.
[caption id="" align="alignnone" width="976"] President Hassan Rouhani pictured at a nuclear plant in Iran in 2015[/caption]
US experts estimated back then that if Iran had decided to rush to make a bomb, it would take two to three months until it had enough 90%-enriched uranium to build a nuclear weapon - the so-called "breakout time".
Iran's current "breakout time", should it attempt to build a nuclear bomb, is estimated to be around a year, but this could be reduced to half a year or even a matter of months if enrichment levels are increased to 20%, for example.