The S&P 500 and the Nasdaq hit record highs after President Donald Trump's comments eased fears of an all-out conflict in the Middle East, as Iran retaliated by firing missiles following the death of an Iranian general last week in a US airstrike.
Trump said at a White House briefing on Wednesday that Iran's missile strikes overnight on military bases housing US troops in Iraq had not harmed any Americans and that Tehran appeared to be standing down.
Global markets have been rattled by fears of turmoil in the Middle East after the US killing of influential Iranian military commander Qassem Soleimani on Jan. 3 prompted the overnight strike from Iran.
US stock futures tumbled 1.7% overnight, but comments from Iran's foreign minister that the country did not seek an escalation and Trump's tweet that "All is well!" helped inject some calm early on Wednesday.
"The de-escalation nature of the (Trump) speech is really what the market is focused on," said Michael Antonelli, market strategist at Robert W. Baird.
"It's Trump essentially saying that we're not going to retaliate to the missile attacks last night."
Trump's latest comments sent the S&P 500 and the Nasdaq to all-time highs, previously hit on the first trading day of 2020 on hopes of a US-China trade deal.
At 12:53 p.m. ET, the Dow Jones Industrial Average was up 199.00 points, or 0.70%, at 28,782.68, the S&P 500 was up 20.72 points, or 0.64%, at 3,257.90 and the Nasdaq Composite was up 69.63 points, or 0.77%, at 9,138.21.
The blue-chip Dow was just below its all-time high as Boeing fell 1.3% after its 737-800 jet belonging to a Ukrainian airline burst into flames shortly after take-off from Tehran, killing all 176 people aboard.
Walgreens Boots Alliance Inc slid 6.2% as its quarterly profit missed expectations. Shares in rival CVS Health fell 1.5%.
Lennar Corp gained 2% after the No. 2 US homebuilder beat quarterly profit estimates on lower home prices and mortgage rates.