By Chuck Mikolajczak

NEW YORK (Reuters) - Wall Street advanced modestly on Wednesday after a sharp rise in oil prices boosted energy shares, while better-than-anticipated data on the labor market helped financial stocks.

U.S. oil prices <CLc1> jumped more than 3 percent to settle at $40.83 a barrel after a larger-than-expected gasoline draw offset a surprise build in U.S. crude stockpiles. WTI crude had settled below $40 for the first time since April on Tuesday.

The S&P energy index <.SPNY> was up 1.8 percent as the best performing of the 10 major S&P groups.

"The focus, at least near term, is definitely on energy prices and if we can hold $40 (oil) the market is fine here. If it can’t hold $40, there is going to be more pressure on the overall market," said Tim Ghriskey, chief investment officer of Solaris Group in Bedford Hills, New York.

"It’s back to worries about oil and excess supply and demand that is OK but not great."

Data showed the U.S. private sector added 179,000 jobs in July, beating estimates of 170,000. The report comes ahead of the more comprehensive national payrolls report 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 benchmark U.S. interest rates later this year.

Chicago Federal Reserve Bank President Charles Evans said on Wednesday that one rate hike may be appropriate this year, despite his worry that inflation is still undershooting the U.S. central bank's 2 percent target.

The possibility of a rate hike this year helped support financial stocks, along with a 7.3 percent jump in American International Group <AIG.N> after the largest commercial insurer in the United States and Canada reported an operating profit that beat analysts' estimate.

The S&P financial sector <.SPSY> rose 1 percent.

Healthcare shares <.SPXHC> were lower, weighed down by a 2.7 percent drop in Biogen <BIIB.O>. Reuters reported the company has not received any formal expressions of interest from potential acquirers a day after buyout reports on Tuesday sent the stock up more than 9 percent.

The Dow Jones industrial average <.DJI> rose 41.23 points, or 0.23 percent, to 18,355, the S&P 500 <.SPX> gained 6.75 points, or 0.31 percent, to 2,163.78 and the Nasdaq Composite <.IXIC> added 22.01 points, or 0.43 percent, to 5,159.74.

Advancing issues outnumbered declining ones on the NYSE by a 2.10-to-1 ratio; on Nasdaq, a 1.92-to-1 ratio favored advancers.

The S&P 500 posted 10 new 52-week highs and one new low; the Nasdaq Composite recorded 69 new highs and 35 new lows.

About 6.67 billion shares changed hands in U.S. exchanges, compared with the 6.6 billion daily average over the last 20 sessions.

(Reporting by Chuck Mikolajczak; Editing by James Dalgleish)