Wall Street's main indexes have seesawed throughout the session to close higher as investors sought to pick up technology names that had been beaten down in recent days ahead of this week's Federal Reserve meeting.
The gathering of US central bank policymakers is widely expected to raise interest rates by half a percentage point, with this week's move expected to kick off a period of aggressive rate hikes to counter inflation.
Nervousness heading into the meeting was reflected in a topsy-turvy session for US equities.
Intraday, the S&P 500 fell to its lowest level since May 2021 and the Nasdaq touched a level last hit in November 2020.
It was also seen in the market for US Treasuries, where the ten-year benchmark breached 3.0 per cent for the first time in more than three years.
As well as positioning themselves for the expected rate hike, traders were also looking to the launch of "quantitative tightening," where the central bank reduces its balance sheet after buying bonds to support the economy during the pandemic.
High-growth stocks, such as technology companies, have been pummelled this year as a result of traders adjusting for this environment, with losses accentuated in recent days by a number of disappointing earnings reports from the megacaps.
However, Facebook parent Meta Platforms Inc climbed after falling 9.8 per cent last month while Microsoft Corp and Nvidia Corp gained after sharp declines in April.
Amazon.com Inc slid on Monday, adding to a 14 per cent drop on Friday after a gloomy quarterly report.
Apple Inc dipped as the iPhone maker faced a possible hefty fine after European Union antitrust regulators charged it with restricting rivals' access to its technology used for mobile wallets.
"It's a waiting game. Let's see what the Fed says, what the inflation data looks like later next week and we've got a lot of earnings (reports) this week," said Dennis Dick, a trader at Bright Trading LLC.
"It has been a hard market and sentiment has got to a point where a lot of people have turned down this market. I'm not saying the bottom is in, but maybe it's time to get off that cash and get some of that money back to work."
The S&P 500 gained 23.88 points, or 0.58 per cent, to end at 4,155.60 points, while the Nasdaq Composite gained 200.48 points, or 1.63 per cent, to 12,535.12 and the Dow Jones Industrial Average rose 89.70 points, or 0.27 per cent, to 33,066.91.
Amid the 11 S&P sectors, the real-estate index was the biggest decliner.
Pfizer Inc fell after a large trial found its COVID-19 oral antiviral treatment Paxlovid was not effective at preventing coronavirus infections in people living with someone infected with the virus.
Activision Blizzard climbed after Warren Buffett said Berkshire Hathaway Inc has taken a 9.5 per cent stake in the Call of Duty game maker.
Spirit Airlines slid after the ultra low-cost carrier rejected JetBlue Airways Corp's $US33-per-share takeover offer, saying it had a low likelihood of winning approval from government regulators.
By comparison, JetBlue ended higher, regaining ground lost during a midday wobble that had wiped out initial gains.