Wall Street edged higher on Thursday as investors looked beyond disappointing earnings from Ford and bought shares in Apple, while Alphabet surged after the bell following its quarterly report.
It was the 10th session of range-bound trading, following a sharp rally in late June and early July that hit record highs and has left the S&P 500 up 6 percent for the year.
In extended trade, Alphabet jumped 4 percent after the Google parent-company reported stronger-than-expected revenue. Amazon.com (AMZN.O) rose 1.7 percent after its quarterly report.
"Tech has been pretty much the strongest sector over the last month. Momentum players are focussing to buy on pullbacks," said Michael Matousek, head trader at U.S. Global Investors in San Antonio.
Earlier, Apple (AAPL.O) rose 1.35 percent, giving the S&P 500 its biggest lift.
Six of the 10 major S&P 500 sectors ended higher, with the consumer staples sector .SPLRCS up 0.47 percent.
Ford reported weak China sales and declared that the U.S. auto industry's long recovery was at an end, triggering a 8.16-percent fall in its shares. The stock was the biggest drag on the S&P 500 index.
The carmaker's dismal forecast rattled the wider automobile market, with shares of General Motors (GM.N) falling 3.22 percent and Fiat Chrysler (FCAU.N) 4.77 percent.
A report by the U.S. Labour Department showed that the number of people claiming unemployment benefits rose more than expected to 266,000 for the week ended July 22.
The Dow Jones industrial average .DJI edged down 0.09 percent to end at 18,456.35 points and the S&P 500 .SPX gained 0.16 percent to 2,170.06. The Nasdaq Composite .IXIC added 0.3 percent to 5,154.98.
Advancing issues outnumbered declining ones on the NYSE by a 1.07-to-1 ratio; on Nasdaq, a 1.13-to-1 ratio favoured decliners.
The S&P 500 posted 36 new 52-week highs and no new lows; the Nasdaq Composite recorded 114 new highs and 25 new lows.
About 6.6 billion shares changed hands on U.S. exchanges, just below the nearly 6.7 billion daily average over the past 20 sessions.
(Additional reporting by Yashaswini Swamynathan in Bengaluru; Editing by Nick Zieminski)