Stocks closed little changed on Tuesday after President Donald Trump announced he was withdrawing the U.S. from the Iran nuclear deal signed three years ago.
The Dow Jones industrial average finished 2.89 points higher at 24,360.21, with J.P. Morgan Chase as the best-performing stock in the index. The 30-stock index briefly fell more than 150 points following the announcement.
The closed just below breakeven at 2,671.92 as utilities fell 2.5 percent. The Nasdaq composite eked out a small gain to close at 7,266.90.
Back in 2015, the Obama administration and Iran signed a deal to defer sanctions on Iranian oil exports, while Iran curbed its nuclear program. On Tuesday, Trump said the U.S. was pulling out of that deal and restoring sanctions.
Crude settled 2.4 percent lower at $69.06 per barrel and briefly fell more than 3 percent.
"If financials weren't performing well today, we'd be looking at a much darker picture," said JJ Kinahan, chief market strategist at TD Ameritrade. "If you look at the rest of the board, things are kind of pink."
The finanicals sector was one of four that closed higher on Tuesday, climbing 0.7 percent. Industrials also rose, as shares of defense companies jumped. The iShares U.S. Aerospace & Defense ETF (ITA) rose 1.5 percent, its best day since March 26, when it surged 2.6 percent.
Quincy Krosby, chief market strategist at Prudential Financial, said the market will view the announcement as preview on " how he deals with other foreign policy matters such as North Korea."
Trump had threatened numerous times to withdraw the U.S. from the Iran deal unless allies in Europe amend what he sees as shortcomings of the agreement.
In spite of the Trump's threats to pull out, Iran President Hassan Rouhani has stated that Iran had a plan to counter any move made by Trump when it comes to the deal.
"Allowing Iran to produce nuclear fuel again would further boost the dollar and lower US Treasury yields," said Komal Sri-Kumar, president of Sri-Kumar Global Strategies, in an email. "The US withdrawal from Iran the treaty would be another step in isolating the US from rest of the world."
U.S. Treasury yields rose slightly on Tuesday, while the dollar climbed 0.4 percent against a basket of currencies.
Equities closed off their session highs on Monday after Trump tweeted the announcement was coming. The major averages were propelled to their highs by energy stocks, which rose more than 2 percent on Monday before closing slightly higher.
In corporate news on Tuesday, sources told CNBC that NBCUniversal-parent Comcast is planning an all-cash bid for most of 21-Century Fox's assets if the U.S. government approves AT&T's purchase of Time Warner. Comcast shares dropped 5.5 percent, while Fox slipped 0.1 percent.
In central bank news, Fed Chair Jerome Powell delivered remarks in Zurich Tuesday. At the Swiss National Bank and International Monetary Fund's High Level Conference, the chair of the U.S. central bank said that the Fed's interest rate hikes may not end up having as great of a risk on emerging market economies and stock markets as many had initially thought.
Powell added that the central bank would however continue to communicate its policies clearly, to avoid market disruptions.
—CNBC's Tom DiChristopher contributed to this report.