Data showed the U.S. private sector added 179,000 jobs in July, beating estimates of 170,000. The ADP national employment report is seen as a precursor to the more comprehensive jobs data on Friday.

If the labor market is able to build on its recent strength, it could make the case for the Federal Reserve to raise interest rates later this year.

“I think any kind of strength in the overall economy does help the financials because it increases the prospects of the Fed being able to raise interest rates,” said Robert Pavlik, chief market strategist at Boston Private Wealth in New York.

Oil prices jumped 3 percent, rising for the first time in six days, after a larger-than-expected gasoline draw offset a surprise build in U.S. crude stockpiles.

“You are still seeing some pressure on energy stocks, but I think for the most part, it is not completely scaring everybody out of the energy space,” Pavlik said.

Five of the 10 major S&P sectors were higher, led by a 1.13 percent rise in energy stocks, followed by 0.88 percent gains in financials.

Shares of JPMorgan, Citigroup, and Bank of America rose between 1.3 percent and 2.2 percent and were among the top five stocks to boost the S&P 500.

Goldman Sachs was up 1.6 percent at $158.46 and gave the biggest boost to the Dow.