Merger activity also helped, with shares of Office Depot (>> Office Depot Inc) jumping 21.6 percent to $9.28 after the Wall Street Journal reported the retailer was in advanced talks to merge with Staples Inc (>> Staples, Inc.). Staples shares gained 10.9 percent to $19.01.

The S&P 500 has gained 2.8 percent over two sessions as the bounceback in oil prices and hopes of a Greek debt deal eased some concerns about the global economy, but the index has been locked in a trading range of 1,972 to 2,093 since mid-December and is nearly flat since Dec. 31.

The year so far has been marked by volatility, with the S&P 500's daily trading range often more than double its average over the past year.

U.S. crude oil prices rose 7 percent to settle at $53.05 . Brent and U.S. oil prices have risen roughly 19 percent since Wednesday's close. The S&P 500 energy index <.SPNY> climbed 2.8 percent.

Shares of Dow components Exxon Mobil (>> Exxon Mobil Corporation) were up 3 percent at $92.25 and Chevron (>> Chevron Corporation) added 3.3 percent at $109.53. Machinery maker Caterpillar (>> Caterpillar Inc.) rose 3.8 percent to $83.92, among the Dow's biggest boosters.

"You've had some of those who had been extremely bearish start to take off their bearish bets when it felt like you may have gotten to a short-term bottom in oil," said Michael James, managing director of equity trading at Wedbush Securities in Los Angeles.

"Some of the trader pressure on the commodity itself has abated somewhat. With that, you've had more of an equity risk-on mentality."

The Dow Jones industrial average <.DJI> rose 305.36 points, or 1.76 percent, to 17,666.4, the S&P 500 <.SPX> gained 29.18 points, or 1.44 percent, to 2,050.03 and the Nasdaq Composite <.IXIC> added 51.05 points, or 1.09 percent, to 4,727.74.

January car sales topped expectations, buoyed by low gas prices and easy credit. Ford Motor gained 2.5 percent to $15.65, General Motors (>> General Motors Company) rose 2.6 percent to $33.98 and Fiat Chrysler (>> Fiat Chrysler Automobiles NV) climbed 3.3 percent to $13.95.

After the bell, shares of Chipotle Mexican Grill (>> Chipotle Mexican Grill, Inc.) fell 5.9 percent to $684 while shares of Walt Disney (>> Walt Disney Co) rose 3.1 percent to $96.97, both following results.

Even as S&P 500 profit growth estimates for the fourth quarter have risen as more companies report, expectations for first-quarter results have tumbled. First-quarter earnings are now expected to fall 1.2 percent from a year ago, Thomson Reuters data showed.

About 8.4 billion shares changed hands on U.S. exchanges, above the 7.7 billion average for the last five sessions, according to BATS Global Markets.

NYSE advancers outnumbered decliners 2,478 to 615, a 4.03-to-1 ratio; on the Nasdaq, 2,029 issues rose and 753 fell, a 2.69-to-1 ratio.

The S&P 500 posted 19 new 52-week highs and no new lows; the Nasdaq Composite recorded 65 new highs and 34 new lows.

(Editing by Bernadette Baum and Nick Zieminski)

By Caroline Valetkevitch