A late-day rally fizzled just before the markets’ close Monday leaving U.S. stocks mixed. Gains in Facebook Inc. and Alphabet Inc. helped to overcome a crude-oil led sell-off in energy shares while concerns faded that China’s slowdown will spread.

At the close on Wall Street, the Dow Jones industrial average was down 17.1 points, about 0.1 percent, at 16,499. 2. The Standard & Poor’s 500 index was off less than a point at 1,939.4. The Nasdaq composite gained 6.4 points, about 0.1 percent, to 4,620.4.

As markets closed, the price of U.S. benchmark crude oil was down $2.18, about 6.5 percent, at $31.44 a barrel on the New York Mercantile Exchange. In London the price of the international benchmark, Brent crude was down $1.89, about 5.3 percent, at $34.10 a barrel.

Energy companies retreated with crude prices, after capping back-to-back weekly advances for the first time since November.

Exxon Mobil Corp. lost $1.56, about 2 percent, closing at $76.29, before its earnings report Tuesday.

Gains among Internet companies helped put a floor under equities, with Facebook and Google parent Alphabet rising more than 1.4 percent. Netflix Inc. increased 3.3 percent, $2.25 to close at $94.09, on speculation that Apple Inc. could make an offer for the online video company.

“The weak numbers out of China and the lower oil price are keeping a lid on the market,” said Benno Galliker, a trader at Luzerner Kantonalbank AG. “I actually expect a positive start into the new month but the market is still shaky and February will be not easy. The focus is on China, oil and earnings.”

advertisement | advertise on newsday

Worries about a slowdown in the world’s second-biggest economy and a rout in oil have roiled global equities this year.

While the S&P 500 recouped some losses in the past two weeks, paring its January drop to 5.1 percent, the respite may be short-lived. China’s official factory gauge Monday signaled a record sixth month of deterioration, while oil resumed a decline.

The main U.S. equity gauge is 9 percent away from an all-time high set in May, and had rebounded 4.4 percent as of Friday from a 21-month low on Jan. 20 led by a nearly 12 percent climb by energy producers.

Amid the turbulence, investors have been loading up on shares of companies with the sturdiest earnings momentum. Qualities that define winning investments no longer include the high-risk, high-reward potential of companies whose balance sheets are laden with debt. Such a shift has been a bearish signal for stocks in the past, often marking the end of bull markets.