NEW YORK (Reuters) - The S&P 500 closed just barely lower on Thursday, as a dive in industrial stocks and concerns about slowing global growth eclipsed gains in Facebook and Microsoft.

FILE PHOTO: Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., April 24, 2019. REUTERS/Brendan McDermid

The industrials sector fell 1.99% with hefty drags from 3M, United Parcel Service Inc and Raytheon Co after they reported disappointing results. Fedex Corp also slumped after UPS’s profit miss.

Amazon.com Inc shares were up 1.7% after the market closed after the company reported a first-quarter profit that topped estimates, although its second-quarter revenue forecast was largely below expectations. Intel Corp shares fell 7% after the chip maker forecast current-quarter revenue below analysts’ estimates. But shares of Facebook Inc and Microsoft Corp both jumped, rising 5.8% and 3.3%, respectively, after they reported better-than-expected results.

“Sentiment is fluctuating as a result of mixed messages from earnings and data. We’re going to continue to see fluctuations because we’re likely to continue to see mixed messages,” said Kristina Hooper, chief global market strategist at Invesco in New York. She also cited high U.S. jobless claims and an unexpected shrinking of the South Korean economy.

While expectations for aggregate S&P first-quarter earnings improved, investors kept a wary eye on future reports, said Lindsey Bell, investment strategist at CFRA Research in New York.

“Second-quarter estimates continue to be reduced. That’s telling you there’s a lot of caution. That’s coming from corporate management teams as they provide guidance and the market is following their lead,” Bell said. “We’re still in a wait-and-see mode regarding the direction of the economy so nobody’s willing to go all out in the market right now especially with valuations at a premium.”

The S&P 500 has rallied 17% so far this year, rebounding from a late-2018 slump, on hopes of a U.S.-China trade deal, the Federal Reserve’s move to pause interest rate hikes and some better-than-expected earnings reports.

The index ended the day 0.5% below its late September record high. It has struggled to break above that level as investors await more positive catalysts.

The Dow Jones Industrial Average fell 134.97 points, or 0.51%, to 26,462.08, the S&P 500 lost 1.08 points, or 0.04%, to 2,926.17, and the Nasdaq Composite added 16.67 points, or 0.21%, to 8,118.68.

Refinitiv data through Thursday morning showed that Wall Street now expects S&P 500 first-quarter earnings to be level with the year-ago quarter, a sharp improvement from the 1.1% decline expected just on Wednesday, and better than the 2% fall expected at the start of April. Excluding energy, the growth rate would climb to 1.4%.

Gains in social media company Facebook lifted the communication services index 1%, making it the second biggest gainer among the 11 major S&P sectors. Healthcare stocks rose 1.1%.

But 3M fell almost 13% in its biggest one-day percentage drop in more than three decades, after it cut its 2019 earnings view and announced plans to lay off 2,000 workers. It was the biggest decline since Oct. 19, 1987, when it dropped 20.3% in a broad market crash.

Xilinx Inc was the S&P’s biggest percentage decliner, falling 17.1% after the chipmaker’s quarterly gross margins fell short of estimates. The Philadelphia chip index dropped 1.8%.

Declining issues outnumbered advancing ones on the NYSE by a 1.80-to-1 ratio; on Nasdaq, a 1.47-to-1 ratio favored decliners.

The S&P 500 posted 23 new 52-week highs and four new lows; the Nasdaq Composite recorded 56 new highs and 58 new lows.

On U.S. exchanges 6.64 billion shares changed hands, in line with the 6.64 billion average for the last 20 sessions.