United States President Donald Trump has confirmed reports that he ordered an attack on Iran but called the operation off when it was already underway.

Key points: US warplanes were poised to strike when Mr Trump ordered them to stand down

US warplanes were poised to strike when Mr Trump ordered them to stand down Iran has warned it is "fully ready for war"

Iran has warned it is "fully ready for war" The Iranian military posted footage showing the moment it shot down a US military drone

In a series of tweets, Mr Trump attacked former president Barack Obama over the nuclear deal he struck with Iran, before confirming he called off strikes against the country in retaliation to the downing of a US drone.

"We were cocked and loaded to retaliate last night on three different sights [sic] when I asked 'how many will die?' '150 people' was the answer from a general. Ten minutes before the strike I stopped it, not proportionate to shooting down an unmanned drone," he said.

Mr Trump also said the US was "ready to go", and warned Iran would "never have nuclear weapons".

Loading

Iranian officials told Reuters that Tehran had received a message from Mr Trump warning that a US attack on Iran was imminent but that he was against war and wanted to talk.

In his tweets, Mr Trump did not address whether he had sent a message to Iranian officials about the attack.

A senior administration official earlier told The New York Times that Mr Trump approved attacks on Iranian targets such as radar and missile batteries.

The Times report said it was not clear if Mr Trump "simply changed his mind on the strikes or whether the administration altered course because of logistics or strategy. It was also not clear whether the attacks might still go forward".

The reports surfaced as tensions continued to rise in the wake of Iran shooting down a US drone over the Strait of Hormuz, the shipping lane which has been the site of recent attacks on oil tankers.

The US, which is ratcheting up sanctions pressure on Iran, has blamed the Iranians for the attacks, a claim rejected by the Government in Tehran.

An Iranian general warned the country was "fully ready for war" after its military posted dramatic video footage showing what it said was the moment the drone was shot out of the sky.

The video shows a surface-to-air missile being launched and an explosion in the sky.

Space to play or pause, M to mute, left and right arrows to seek, up and down arrows for volume. Watch Duration: 45 seconds 45 s Iran releases video claiming to show drone shootdown

The commander of Iran's Revolutionary Guard said the shooting down of the US drone sent "a clear message" to America.

"We do not have any intention for war with any country, but we are fully ready for war," General Hossein Salami said in a televised address.

The Trump administration is combining a "maximum pressure" campaign of economic sanctions with a build-up of American forces in the region.

While Iran portrayed the downing of the unmanned aircraft as a deliberate defence of its territory rather than a mistake, the US said the drone was shot down in international airspace.

Airlines fear 'potential for miscalculation'

Major global airlines have begun re-routing their flights to avoid areas around the Strait of Hormuz and the Gulf of Oman, with America's top aviation authority warning that commercial airliners could be mistakenly attacked.

The Federal Aviation Administration (FAA) said there was "potential for miscalculation or misidentification" in the region.

The warning comes days after murder charges were laid for Russian and Ukranian nationals who are accused of shooting down Malaysian Airlines flight MH17 over eastern Ukraine in 2014, killing 298 people.

"The threat of a civil aircraft shootdown in southern Iran is real," warned OPSGROUP, a company that provides guidance to global airlines.

The FAA made a similar warning in May to commercial airliners of the possibility of Iranian anti-aircraft gunners mistaking them for military aircraft, something dismissed by Tehran some 30 years after the US Navy shot down an Iranian passenger jet.

Iran had no immediate reaction to the US announcement.

A Qantas spokesperson said the airline was adjusting flight paths over the Middle East to avoid the area until further notice.

Inflammatory language couched in conciliatory tones

Space to play or pause, M to mute, left and right arrows to seek, up and down arrows for volume. Watch Duration: 17 seconds 17 s The attacks left one tanker on fire and all sailors were evacuated from both ships

Bryce Wakefield, executive director of the Australian Institute of International Affairs, said it was important to note that both sides had used some "conciliatory language attached to their bluster".

"What it looks like at the moment is that both sides are trying to look tough while trying to send the message that there may be some way out of this," Dr Wakefield told ABC News.

"Iran has said that it doesn't want to go to war, but it is prepared to if need be.

"Trump has wavered between what looked like authorising war and then stepping back, and also making some conciliatory gestures."

However, he said Secretary of State Mike Pompeo had laid down "a very clear red line", and that was the US would go to war when a US service member was attacked and lost his or her life.

"That sets up space for Iran to manoeuvre … up to that red line, which sets the scene for aggravation, but also tells Iran where to stop," he said.

The latest developments come less than a week after the US accused Iran of attacking two oil tankers, which prompted Saudi Arabia's Crown Prince Mohammed bin Salman to call on the international community to take a "decisive stand" against Iran.

Iran has also threatened to break the uranium stockpile limit set by Tehran's nuclear deal with world powers.

The landmark 2015 accord has steadily unravelled since the Trump administration pulled out of the deal last year and reimposed tough economic sanctions on Iran, sending the nation's economy into freefall.

Iran on Thursday called the sanctions "economic terrorism", insisted the drone had invaded its airspace and said it was taking its case to the United Nations in an effort to prove the US was lying about the aircraft being over international waters.

It accused the US of "a very dangerous and provocative act".

ABC/wires