US President Donald Trump has said he was "not talking boots on the ground" should he take military action against Iran.

Mr Trump also said he had "unlimited time" to try to forge an agreement with the Middle Eastern nation.

Iran suggested it was just one day from breaching a limit in the 2015 nuclear deal that restricted its stockpile of uranium - a move that would pressure European countries aiming to be neutral in the dispute to pick sides.

The fate of the multilateral nuclear deal, under which Iran agreed to curbs on its nuclear program in return for relief from economic sanctions, has been at the heart of the US-Iran dispute which took on a military dimension in recent weeks.

Last week Iran shot down a US drone it said was in its airspace, which the US denied.

Mr Trump called off retaliatory airstrikes at the last minute, saying too many people would have died.

The US also accused Iran or its proxies of attacks in May and June on six tankers in the Gulf region, which Iran denies.

Asked on Fox Business Network if a war was brewing, Mr Trump replied: "I hope we don't but we're in a very strong position if something should happen."

"I'm not talking boots on the ground," Mr Trump said. "I'm just saying if something would happen, it wouldn't last very long."

Speaking later at a gathering of religious conservatives, the US president talked about whether there could be a new agreement with Iran, suggesting he could live without one.

"If it doesn't happen, that's fine with me," Mr Trump said. "I have unlimited time, as far as I'm concerned.

Mr Trump last year unilaterally withdrew from the nuclear deal with Iran struck by his predecessor President Barack Obama, arguing that it did not go far enough to restrict Iran's nuclear and missile programs and other activities in the Middle East.

He has since re-imposed US economic sanctions on Iran, including taking the unprecedented step in May of trying to drive Iran's oil exports to zero.

Iran has warned the UN Security Council it would no longer be burdened with preserving the pact, originally struck by Iran and Britain, China, France, Germany, Russia and the United States.

European states pushed Iran to stick with the agreement because there was no peaceful alternative.

"Iran alone cannot, shall not and will not take all of the burdens any more to preserve the JCPOA," Iran's UN Ambassador Majid Takht Ravanchi told the 15-member Security Council, using the acronym for the deal's formal name, the Joint Comprehensive Plan of Action.

US allies warn that an increase in tensions could accidentally lead to war.