President Donald Trump approved retaliatory military strikes against Iran on Thursday before changing his mind, US media report.
The New York Times, citing senior White House officials, says strikes were planned against a "handful" of targets.
They say the operation was allegedly under way "in its early stages" when Mr Trump stood the US military down. The White House has so far made no comment.
This comes after Iran shot down a US spy drone.
Tehran says the unmanned US aircraft entered Iranian airspace early on Thursday morning. The US maintains it was shot down in international airspace.
Tensions have been escalating between the two countries, with the US recently blaming Iran for attacks on oil tankers operating in the region. Iran has announced it will soon exceed international agreed limits on its nuclear programme.
Last year, the US unilaterally pulled out of a 2015 nuclear deal aimed at curbing Iran's nuclear activities.
What do US media say?
The New York Times first published details of the apparent planned strikes late on Thursday night in Washington.
As late as 19:00 local time (23:00 GMT), it said, US military and diplomatic officials still expected the strikes on agreed targets, including Iranian radar and missile batteries, to take place.
"Planes were in the air and ships were in position, but no missiles had been fired when word came to stand down," the newspaper reported, citing an unnamed senior administration official.
The strikes were set to take place just before dawn on Friday to minimise risk to the Iranian military or to civilians, the newspaper added.
Several other US media outlets then independently reported the same but their accounts differed on the role of the Pentagon.
The Associated Press quoted a US official as saying the strikes had been recommended by the Pentagon and had been among options presented to senior administration officials.
According to the New York Times, top Pentagon officials warned a military response could result in a spiralling escalation with risks for US forces in the region.
The operation was called off after President Trump spent most of Thursday discussing Iran with his national security advisers and congressional leaders, AP reports.
US Secretary of State Mike Pompeo and National Security Adviser John Bolton had pushed for a hardline stance, but congressional leaders urged caution, the agency says.
Democratic House Speaker Nancy Pelosi said the US had no appetite for war with Iran, while the leading candidate for the Democratic presidential nomination, Joe Biden, called Mr Trump's Iran strategy a "self-inflicted disaster".
Senate Majority Leader Mitch McConnell, a Republican, said: "The administration is engaged in what I would call measured responses."
The top Democrat in the US Senate, Chuck Schumer, said: "The president may not intend to go to war here, but we're worried that he and the administration may bumble into a war."
Separately, Reuters quoted two Iranian officials as saying Tehran had received a message from Mr Trump through Oman overnight warning about an imminent US attack.
"Trump said he was against any war with Iran and wanted to talk to Tehran about various issues," one of the two officials said.
"He [Trump] gave a short period of time to get our response but Iran's immediate response was that it is up to Supreme Leader [Ayatollah Ali] Khamenei to decide about this issue."
The other Iranian official warned that "any attack against Iran will have regional and international consequences".
Even the suggestion that President Trump ordered - and then aborted - an attack on Iran, sends a powerful message to Tehran.
The two countries came to the brink of direct conflict. But in this complex game of signalling just what message will the Iranian leadership receive?
It, after all, had sent a significant warning of its own by downing an unmanned US reconnaissance drone.
Mr Trump initially appeared to play down the incident - but then apparently came the orders for a US retaliatory strike.
The danger now is that Iran receives mixed messages that convey uncertainty and lack of resolve. This might encourage some in Tehran to push back at the Americans even harder.
There appears to be no easy diplomatic "off-ramp" in this crisis.
US economic sanctions are hitting home. Tehran is under pressure. Escalation remains an ever-present danger.
What happened with the drone?
On Thursday morning, Iran's Islamic Revolutionary Guard Corps (IRGC) announced its air force had shot down a US "spy" drone in the early hours after the unmanned aircraft violated Iranian airspace near Kuhmobarak in the southern province of Hormozgan.
IRGC commander-in-chief Maj-Gen Hossein Salami said the drone's downing was a "clear message" to the US that Iran's borders were "our red line".
Iranian Foreign Minister Javad Zarif tweeted that the US drone had taken off from the United Arab Emirates in "stealth mode".
"We've retrieved sections of the US military drone in our territorial waters where it was shot down," he wrote.
The US military's Central Command later confirmed that a US Navy Broad Area Maritime Surveillance (BAMS-D) aircraft had been shot down by an Iranian surface-to-air missile.
However, US military officials maintain the drone was in international airspace over the Strait of Hormuz at the time.
In response, the US Federal Aviation Administration (FAA) issued an emergency order on Thursday evening prohibiting US airlines from operating in an overwater area of Tehran-controlled airspace nearby in response.
It said there were "numerous civil aviation aircraft operating in the area" at the time the US drone was shot down.
Airlines from other countries, including Britain's British Airways, the Dutch carrier KLM and Qantas of Australia, have also said they will re-route their flights to avoid parts of Iran.
What has Mr Trump said?
Speaking on Thursday, Mr Trump said Iran had "made a big mistake". The US, he said, had scientific evidence the drone was in international airspace when it was shot from the sky.
Asked about his response to the incident and whether or not he would go to war with Iran, the president repeatedly replied: "You'll find out".
He also suggested that the shooting-down could have been caused by human error.
What other reaction has there been?
Russian President Vladimir Putin has warned that war between the US and Iran would be a "catastrophe with unpredictable consequences".
UN Secretary General Antonio Guterres has urged all parties to exercise maximum restraint.
What else has fuelled US-Iran tensions?
On Monday, the US defence department said it was deploying 1,000 extra troops to the region in response to "hostile behaviour" by Iranian forces.
Earlier that day, Iran also announced its stockpile of low-enriched uranium would next week exceed limits it agreed with world powers under the 2015 deal.
Iran stepped up its production in response to tightening economic sanctions from the US, which unilaterally withdrew from the deal last year.
The US has also accused Iran of attacking two oil tankers with mines last Thursday just outside the Strait of Hormuz, in the Gulf of Oman.
It was the second time in a month tankers had been attacked close in the region, through which a fifth of the world's oil passes each day.
Iran denies blame for the attacks.