Stocks rose sharply on Friday as investor sentiment got a lift from much stronger-than-expected U.S. jobs data.

The Dow Jones Industrial Average closed 301.13 points higher, or 1.1% to27,347.36. The S&P 500 gained 1% to end the day at 3,066.91, a fresh record close. The Nasdaq Composite also hit an all-time high, climbing 1.1% to 8,386.40.

Exxon Mobil was among the best-performing stocks in the Dow on the back of stronger-than-forecast quarterly results. The stock gained 3%. The industrials and financials sectors rose more than 1.4% each. Apple shares rose more than 2% to a record high, lifting the Nasdaq.

"The October jobs report was very strong," said Gus Faucher, chief economist at PNC. "Job growth slowed a bit because of the GM strike, but with the strike over it should bounce back in November."

The U.S. economy added 128,000 jobs in October, the Labor Department said Friday. Economists polled by Dow Jones expected a gain of 75,000 jobs for the previous month. October jobs growth easily beat estimates despite a decline of 42,000 jobs in the autos sector due to a General Motors strike that has now been settled.

Jobs growth data for September and August was also revised substantially higher. September's number was revised up to 180,000 from 136,000. August jobs growth was revised to 219,000 from 168,000.