Microsoft jumped 5.6% after it said it would push ahead with talks to buy the U.S. operations of Chinese-owned TikTok. President Donald Trump reversed course earlier on a planned ban of the short-video app.
ADT soared over 56% on news that Alphabet's Google was buying a nearly 7% stake in the home security firm for $450 million in a deal that will allow it to provide service to customers of its Nest home security devices.
Varian Medical Systems Inc jumped 22% after a $16 billion buyout by Germany's Siemens Healthineers, while Kansas City Southern gained after a report a group of buyout investors were considering a takeover bid in a deal of about $20 billion.
"The market is revolving around M&A activity possibly picking up," said Jake Dollarhide, chief executive officer of Longbow Asset Management in Tulsa, Oklahoma. "It means CEOs are more confident about the future. Otherwise, why would they lay out billions of dollars?"
Apple Inc climbed 2.5%, expanding its rally following stunning quarterly results and announcing a four-for-one stock split. The tech giant is about $140 billion short of hitting $2 trillion in market capitalization.
The S&P 500 information technology index jumped 2.5%, far outpacing other sector indexes.
Congressional Democrats and Trump administration officials resumed talks aimed at hammering out a coronavirus relief bill after missing a vital deadline to extend relief benefits to tens of millions of jobless Americans.
A rally in tech-related stocks and trillions of dollars in monetary and fiscal stimulus have lifted the S&P 500 to within about 3% of February's record high.
The Labor Department's monthly employment report is due on Friday, on the heels of last week's weekly jobless claims data that showed a recovery in the job market appeared to have stalled in late July.
The Dow Jones Industrial Average rose 0.89% to end at 26,664.4 points, while the S&P 500 gained 0.72% to 3,294.61.
The Nasdaq Composite climbed 1.47% to 10,902.80, beating its previous record high close on July 20.
With the U.S. corporate earnings season now past its half-way mark, a record number of companies have beaten dramatically lowered estimates, but the second quarter is still set to be the low point for earnings this year.
Drug distributor McKesson Corp jumped 6.5% after boosting its full-year earnings forecast.
Advancing issues outnumbered declining ones on the NYSE by a 1.94-to-1 ratio; on Nasdaq, a 2.47-to-1 ratio favored advancers.
The S&P 500 posted 41 new 52-week highs and no new lows; the Nasdaq Composite recorded 164 new highs and 16 new lows.
About 9.8 billion shares changed hands in U.S. exchanges, compared with the 10.5 billion daily average over the last 20 sessions.
(Reporting by Sagarika Jaisinghani and Medha Singh in Bengaluru; Editing by Anil D'Silva, Sriraj Kalluvila and Tom Brown)
By Noel Randewich