The S&P 500 rose 1.3 percent to 2,020.85 at 4 p.m. in New York. Buying accelerated after the gauge climbed above its average price for the past 100 days as oil extended gains. Earlier, the index fell to its lowest level since Dec. 17. The Dow Jones industrial average added 196.09 points, or 1.1 percent, to 17,361.04. About 7.6 billion shares changed hands on U.S. exchanges, 12 percent more than the three-month average.

"The price of oil went up, boosting oil and energy stocks, which contributed to the market gain this afternoon and pulled up other sectors too," Walter "Bucky" Hellwig, who helps manage $17 billion at BB&T Wealth Management in Birmingham, Ala., said in a phone interview. "If you had to lay the strength at the feet of one item, it's the fact that oil prices didn't collapse, and in fact moved higher."

Oil rose to a one-month high on speculation that some investors bought contracts to close out bearish bets amid a falling rig count. Gasoline climbed as a refinery strike entered a second day. Crude has fallen more than 50 percent since a June high due to a global supply glut.

Energy shares in the S&P 500 led gains, up 3 percent for the biggest advance in two weeks. Phone shares added 2.4 percent as a group, with Verizon Communications climbing 2.8 percent, the most since Feb. 20, 2014.

The S&P 500 fell 2.8 percent last week, extending the worst monthly loss in a year. Weaker-than-forecast economic growth outweighed a rally in energy shares and the highest consumer confidence reading in 11 years. Continuing concern in Europe over the new Greek government's challenge to an austerity program also played a role. The index lost 3.1 percent for the month, the worst performance since January 2014.

Data on Monday showed factories expanded in January at the weakest pace in a year as orders cooled, a sign weakness in overseas markets is restraining U.S. manufacturing. The Institute for Supply Management's index dropped to 53.5 from 55.1 in December, the report showed. The median forecast in a Bloomberg survey of 74 economists called for a decline to 54.5. Readings greater than 50 signal growth.

The plunge in oil prices is limiting sales at manufacturers such as Caterpillar while slower growth from Europe to China and the strengthening dollar represent another hurdle for U.S. exports.

A report on Monday showed consumer spending fell in January as households took a breather from the breakneck pace of fourth-quarter buying.

Data last week showed the U.S. economy expanded at a slower pace than forecast in the fourth quarter. Cooling business investment, a slump in government outlays and a widening trade gap took some of the luster off the biggest gain in consumer spending in almost nine years.