Stocks closed higher on Wall Street Tuesday, driving the S&P 500 and Dow Jones Industrial Average to their highest levels in nearly three months as optimism over the reopening of the economy overshadowed lingering worries about the coronavirus pandemic.

The S&P 500 rose 1.2%, for a time climbing above the 3,000-point mark for the first time since March 5, until a burst of selling in the final minutes of trading trimmed the market's gains. The Dow spent much of the day above the 25,000-point threshold for the first time since March 10, but the late pullback knocked it slightly lower. The indexes haven’t been at these levels since before widespread business shutdowns aimed at slowing the spread of the outbreak sent the U.S. economy into a sharp skid.

The post-Memorial Day rally followed a strong rise in global markets as more nations push to open their economies. Financial and industrial stocks accounted for much of the market's gains. Companies that rely on consumer spending also rose broadly. Airlines were big winners as traders welcomed data showing a pickup in air travel during the long holiday weekend.

“That was one of the concerns of the recovery, that people would be hesitant to resume their lives,” said Willie Delwiche, investment strategist at Baird. “This is a stock market that’s looking ahead to the economy improving and maybe moving beyond the lockdown mentality...Two weeks from now, if you have a spike in cases, then everyone will reconsider things.”

The S&P 500 rose 36.32 points, or 1.2%, to 2,991.77. The index was coming off a solid week and is on track for a second-straight month of gains. It remains down 11.7% from its all-time high in February.

The Dow climbed 529.95 points, or 2.2%, to 24,995.11. The index had been up more than 700 points. The Nasdaq rose 15.63 points, or 0.2%, to 9,340.22. The Russell 2000 index of small companies gained 37.54 points, or 2.8%, to 1,393.07.

Fears of a crushing recession due to the coronavirus sent the S&P 500 into a skid of more than 30% in March. Hopes for a relatively quick rebound and unprecedented moves by the Federal Reserve and Congress to stem the economic pain drove a historic rebound for stocks in April and have bolstered optimism that the market won’t return to the depths seen two months ago.

Fresh optimism about the development of potential vaccines for COVID-19 have also helped lift stocks. Investors are keenly focused on the process of reopening the U.S. economy, which is likely to accelerate over the summer. Concerns remain that reopening businesses could lead to another surge in infections, potentially hobbling efforts to get the nation’s battered economy growing again.

A couple of economic reports gave traders more reason for encouragement Tuesday. The Commerce Department said sales of new U.S. homes inched up 0.6% last month, a surprising gain that hints at the relative health of many consumers. Over the past 12 months, sales are down 6.2%. Meanwhile, the Conference Board said its index of consumer confidence ticked up in May to 86.6 from a reading of 85.7 in April. The index is still down sharply from February's reading, when it climbed to 130.7.

Optimism over the prospect that consumers will be eager and able to spend money as more businesses open helped push travel-related stocks sharply higher Tuesday. Norwegian Cruise Line climbed 15.3%, Royal Caribbean jumped 14.9% and Carnival rose 12.6%.

Airline stocks soared on indications that air travel is recovering from mid-April lows, although it remains down sharply from pre-pandemic levels. The Transportation Security Administration said about 340,000 people passed through airport checkpoints on Memorial Day. That’s 86.4% less than last year’s holiday, but it’s the smallest percentage drop in U.S. air travel since March 22.

UBS upgraded Southwest Airlines to “buy” from “neutral” on better prospects for a recovery in domestic travel. Shares of all six leading U.S. carriers — Delta, American, United, Southwest, Alaska and JetBlue — jumped between 12.6% and 16.3%.

Financial stocks led Wall Street's rally. The sector gained 5%. It's still down 25.3% so far this year.

Bond yields were broadly higher, in another sign of optimism. The yield on the 10-year Treasury note, a benchmark for interest rates on many consumer loans, rose to 0.70% from 0.66% late Friday.

After two months, the trading floor of the New York Stock Exchange reopened, with New York Gov. Andrew Cuomo ringing the opening bell.

The S&P 500 jumped to nearly a 3-month high, recovering much of its post-pandemic losses. Investors are shifting their focus to how various nations are adapting to getting back to business, while striving to keep new COVID-19 cases in check.

Reassuring comments by the head of China’s central bank also helped spur buying. Benchmarks in Paris, London and Tokyo also gained on Tuesday.

“As is the financial market’s wont these days ... even the slimmest of positive news on the COVID-19 front triggers a bullish immune response and another wave of the peak-virus trade,” said analyst Jeffrey Halley of trading platform Oanda.

Oil rising 

Benchmark U.S. crude gained 77 cents to $34.02 a barrel in electronic trading on the New York Mercantile Exchange. It closed at $33.25 on Friday, and markets were closed on Monday. Brent crude oil, the international standard, rose 48 cents to $36.60 a barrel.

Asia 

Comments from China’s central bank governor on support for its slowing economy also lifted sentiment.

Yi Gang, in an interview on the bank’s website, promised to push down borrowing costs for entrepreneurs and “support development of the real economy.”

He said the People’s Bank of China will pursue a “more flexible” monetary policy in line with official goals announced Friday by Premier Li Keqiang of helping smaller and private companies survive the coronavirus pandemic.

The interview was published as China’s largely ceremonial National People’s Congress holds its annual session, where other senior officials have stressed the need to push growth higher and create jobs, while steering clear of excess government spending.

In Japan, government assessments of commuter train usage showed traffic was still much less than normal on Tuesday after the country lifted its pandemic state of emergency for Tokyo and several other areas. The relaxed precautions are meant to involve what Prime Minister Shinzo Abe has dubbed a “new lifestyle," with widespread wearing of masks and face shields.

Europe and elsewhere 

France’s CAC 40 was up 1% to 4,585 as the government was due to unveil support measures for the auto industry. Germany’s DAX gained 0.6% to 11,458 and the FTSE 100 in Britain, which was closed for trading Monday, rose 1.2% to 6,063.

Tokyo’s benchmark Nikkei 225 jumped 2.6% to finish at 21,277.77, in a rebound to levels for the index not touched since early March. Australia’s S&P/ASX 200 surged nearly 3.0% to 5,780.00. South Korea’s Kospi gained 1.8% to 2,029.78. Hong Kong’s Hang Seng added 1.9% to 23,384.66, while the Shanghai Composite advanced 1.0% to 2,846.55.

The dollar fell to 107.52 Japanese yen from 107.69 yen late Monday. The euro rose to $1.0964 from $1.0898.

— Compiled and edited by ArLuther Lee for The Atlanta Journal-Constitution.