Traders work on the floor of the New York Stock Exchange. Lucas Jackson/Reuters

The Dow Jones Industrial Average closed about 2 percent higher Friday, its biggest gain in three months, after U.S. jobs data suggested the economy is robust enough for the Federal Reserve to raise interest rates for the first time in nearly a decade.

The S&P 500 and the Nasdaq Composite also closed with a gain of about 2 percent.

Nine of the 10 major S&P 500 sectors were higher. The energy index, however, was lower on news that OPEC countries failed to agree on oil production, allowing members to continue pumping oil at current rates into a market that is oversupplied.

Benchmark Brent oil futures and U.S. crude futures were down about 1.5 percent and energy stocks took a beating. Exxon was down 0.5 percent at $78.06, while Chevron fell 0.7 percent to $88.22.

Nonfarm payrolls increased 211,000 in November, the U.S. Labor Department reported, while September and October data were revised to show 35,000 more jobs than previously reported.

The unemployment rate held at a 7-1/2-year low of 5 percent, even as people returned to the labor force in a sign of confidence in the jobs market.

"Investors are looking at a potential of a Fed tightening as a glass half full. They are celebrating that the economy is strong enough to sustain higher interest rates," said Jack Ablin, chief investment officer at BMO Private Bank in Chicago.

Fed funds futures contracts showed that traders see about an 80 percent chance that the Federal Reserve will raise interest rates in December, up from 79 percent before the jobs report.

"At this point, I think [the Fed will] lose all credibility if they don’t raise [rates], absent some exogenous shock," said Brad McMillan, chief investment officer at Commonwealth Financial Network in Waltham, Massachusetts.

The Fed's policy-setting committee will meet on Dec. 15-16.

The closely watched employment report came a day after Fed Chair Janet Yellen struck an upbeat note on the economy when she testified before lawmakers, describing how it had largely met the criteria for a rate hike.

The S&P 500 suffered its biggest daily drop since late September on Thursday after the European Central Bank disappointed market hopes for a more aggressive economic stimulus program.

The Dow Jones Industrial Average closed the day up 370 points, or 2 percent, while the S&P 500 was up 42 points and the Nasdaq Composite gained 105 points.

Financials rallied, with 85 of the 87 stocks in the S&P Financials Index up.

In other company news:

JPMorgan Chase rose 2.3 percent to $67.33 after European antitrust regulators dropped charges against the bank on blocking exchanges from derivatives markets.

Avon Products rose 10.3 percent to $4.40 after a private equity investor group led by Barington Capital proposed a restructuring of the cosmetics maker.

And Cooper Cos. shares fell 8.5 percent to $130.03 after the medical device maker cut its 2016 outlook and reported a lower-than-expected quarterly profit.