US President Donald Trump said yesterday he had agreed to further negotiations with Iran, even as he repeated his assertion that the ceasefire between the decades-old foes was over.

While there have been no direct talks between Iran and the US since last month, Iranian media reported that a delegation from mediator Qatar was in Tehran on Friday after the warring sides exchanged strikes again this week.

It is just over three weeks since Washington and Tehran signed an agreement aimed at turning a months-long ceasefire into a durable peace, but the trading of fire for a second day in a row on Thursday threatened a return to full-scale regional war.

"The Islamic Republic of Iran has asked us to continue 'talks.' We have agreed to do so, but the US has stated to them, in no uncertain terms, that the Cease Fire is OVER!" Trump posted on his Truth Social platform on Friday.

Earlier this week, at a Nato summit, Trump also declared the ceasefire over, but said of Tehran: "It's just a waste of time dealing with them."

US and Iranian delegations have held one round of direct talks in Switzerland subsequent to signing their memorandum of understanding, as well as indirect negotiations in Qatar, but there has been no sign of diplomatic progress since.

Despite Iran saying it had launched attacks on US assets in Qatar and the Gulf state accusing Tehran of attacking one of its tankers in the Strait of Hormuz, Doha on Friday backed continued diplomacy.

Pakistan Prime Minister Shehbaz Sharif, who has also been mediating the conflict, held a call with Qatar's emir on Friday to discuss the recent escalation, Sharif's office said in a statement.

However, Iran's chief negotiator in talks with the US, Mohammad Bagher Ghalibaf, struck a defiant tone.

"Ending the war is a priority for the countries of the world, but everyone must know that this confrontation will never end with Iran's surrender," the ISNA news agency reported him saying.

Iranians, he said, were "fully prepared to defend ourselves".

The tussle persists over disagreements over the Strait of Hormuz, which Tehran insists it must have control over and has expressed a desire to charge fees for transiting it.

It did not have such powers before the war and while the strait comprises Omani and Iranian territorial waters, under international law the two cannot generally block passage or charge tolls.

Tehran on Thursday accused the US of hitting civilian targets including railway bridges, branding the strikes a "gross war crime".