U.S. stocks finished lower Monday, with the S&P 500 and the Nasdaq Composite posting three straight monthly declines for the first time since 2011, while the Dow industrials bucked the trend to post their first monthly gain since November.

The market sold off in the final two hours of a volatile session, as investors took a defensive posture, bidding up utility stocks while selling energy and health-care shares even as crude-oil futures ended sharply higher.

The S&P 500
SPX, -1.04%
finished 16 points, or 0.8% lower, at 1,932, led by a 1.6% drop in health-care stocks and a 1.2% drop in energy shares. Utilities, up 0.2%, were the only sector in positive territory. The index logged a 0.4% monthly decline, its third in a row.

The Dow Jones Industrial Average
DJIA, -0.97%
finished off 123 points, or 0.7%, at 16,516. Caterpillar Inc.
CAT, -2.91%
was the best performer among the blue chips, up 1.2%, while J.P. Morgan Chase
JPM, -0.58%
shares, off 2.2%, weighed.

But the blue-chip gauge ended February with a 0.3% gain after falling for two consecutive months.

Meanwhile, the Nasdaq Composite
COMP, -1.65%
lost 33 points, or 0.7%, to 4,557. The tech-heavy index lost 1.2% over the month.

Monday’s declines came even as oil prices, a commodity that has been acutely linked to stock moves, rallied. At the same time, a batch of lackluster U.S. economic reports weighed on investor sentiment.

Investors seem to be “in this no-man’s-land, where [economic] growth is not good enough to push the market to its former highs but not bad enough to drive it to its lows,” said Mike Antonelli, equity sales trader at R.W Baird & Co.

It’s also hard for equities to rally in a sustainable way while corporate earnings have tumbled in the fourth quarter of 2015 [and] guidance for the first quarter of 2016 is also negative, said Karyn Cavanaugh, senior market strategist at Voya Investment Management.

The market seems prepared to “hunker down” until there is either a significant comeback in corporate earnings or economic data that point to a strong recovery in the U.S. economy, Cavanaugh said.

The fact that investors purchased utility stocks Monday, which usually bear a dividend, also underscored the market’s risk aversion, as utilities are viewed as a “safety play” at times of heightened volatility, said Mike Bailey, director of research at FBB Capital Partners.

Talks about a potential production cut don't necessarily mean oil prices have reached their bottom, “but they have certainly led to stabilization in oil prices,” which was “enough to take away some of the fears in the [equity] market,” said Jeff Carbone, managing director at wealth management firm Cornerstone Financial Partners.

On the U.S. economic front, a gauge of pending home sales dipped 2.5% in January, reflecting some impact from the massive East Coast blizzard last month, but also the strong acceleration in home prices.

Meanwhile, a reading of Chicago-area economic activity indicated contraction in February after looking strong in the prior month. And the Dallas manufacturing index remained in negative territory for the 14th straight month, as new orders and employment fell to their lowest level since 2009.

China worries: Chinese developments also remained an undercurrent for U.S. stocks. After the closing bell in Shanghai, the People’s Bank of China cut its reserve-requirement ratio for that nation’s banks. The fresh stimulus measures somewhat eased fears about a slowdown in the world’s second-largest economy, as it showed that “policy makers still have room to support the economy,” said Mark Williams, chief Asia economist at Capital Economics, in a note.

Global markets were lower overnight after China’s central bank guided the yuan lower for a fifth straight session, pushing it to its weakest level in three weeks. The move sparked a selloff in Asian stocks, with China’s Shanghai Composite
SHCOMP, +0.29%
finishing down 2.9%, which fueled selling in equities across the world.

Intraday Data provided by SIX Financial Information and subject to terms of use. Historical and current end-of-day data provided by SIX Financial Information. All quotes are in local exchange time. Real-time last sale data for U.S. stock quotes reflect trades reported through Nasdaq only. Intraday data delayed at least 15 minutes or per exchange requirements.