New York - Wall Street set aside morning jitters over North Korea's missile launch and rose to a positive finish on Tuesday, reversing losses from earlier in the day.
But oil stocks continued to take a battering as Hurricane Harvey left more than 20% of US production in the Gulf of Mexico off line.
At the close, the blue-chip Dow Jones Industrial Average was 0.3% higher at 21 865.37.
The broader S&P 500, which comprises many US companies based in Houston, Texas, moved barely into positive territory to end at 2 446.30, while the tech-heavy Nasdaq gained 0.3% to 6 301.89.
Although investors were shaken overnight after North Korea launched a missile that passed over Japan, "The market was relieved in large part to find out that our response was measured, as opposed to two weeks ago," said Art Hogan of Wunderlich Securities.
President Donald Trump had earlier promised "fire and fury" if the North persisted in provocations with is nuclear weapons program but on Tuesday made no explicit mention of retaliation, saying only that "all options" were on the table.
Hogan said, "The market took some solace in the fact that we are still trying to find ways to deal with North Korea that are not military."
Gold, a safe-haven asset, gave up some early gains but rose 0.3% from Monday's close to $1 314 per troy ounce.
But with the hurricane disruption to oil production and refining in the Gulf region, shares in ExxonMobil and Royal Dutch Shell were flat while ConocoPhillips fell 0.4% and BP gave up 0.3%.
Electronics retailer Best Buy nosedived 11.9% after warning investors not to expect a repeat of strong quarterly sales results.
But United Technologies added 2.9% after The Wall Street Journal reported the company was close to finalising a deal to acquire aircraft equipment maker Rockwell Collins, which also added 2.2%.
SUBSCRIBE FOR FREE UPDATE: Get Fin24's top morning business news and opinions in your inbox.
Read Fin24's top stories trending on Twitter: Fin24’s top stories