Stocks surged on Friday on the back of U.S. jobs growth that easily topped analyst expectations as Wall Street wrapped up a choppy week of trading.

The Dow Jones Industrial Average was up 337.27 points, or 1.2% at 28,015.06. Friday's performance was the Dow's best since Oct. 4, when it rallied 1.4%. The S&P 500 closed 0.9% higher at 3,145.91 — its biggest one-day gain since Oct. 15 — while the Nasdaq Composite jumped 1% to 8,656.53.

Shares of 3M led the Dow's strong gains, rising more than 4%. The energy sector was the best performer in the S&P 500, jumping 2%. Industrials and financials rose more than 1% each. Google-parent Alphabet closed 0.9% higher and hit an all-time high. Apple shares also reached record levels, gaining 1.9%. Goldman Sachs shares jumped 3.4%.

"The market is very strong," said Mike Katz, partner at Seven Points Capital. "Every time we pull back for a couple of days, we shake out some weak hands, we got right back up to all-time highs."

"Going into year-end, I think we're going to get a pretty good push higher," Katz added.

The S&P 500 came into the session down 0.7% for the week, but Friday's strong gains helped the index recover those losses. The Dow and Nasdaq each entered Friday trading down more than 1% week to date. They were only down 0.1% each for the week after Friday trading ended.

Stocks also closed just below their record highs reached Nov. 27. The S&P 500 was just 0.3% away from hitting an all-time high. The Dow and Nasdaq are both 0.6% off their records.

The U.S. economy added 266,000 jobs in November, according to figures released by the Labor Department. Economists polled by Dow Jones expected a gain of 187,000. The unemployment rate fell to 3.5%, matching its lowest level since 1969.

"After the sharp slowdown at the start of the year, the recent rebound in employment growth is clearly encouraging, and suggests that the loosening in financial conditions this year is starting to support the economy," said Andrew Hunter, senior U.S. economist at Capital Economics, in a note.

Treasury yields climbed to their session highs after the data was released, pushing prices down. The benchmark 10-year yield traded at 1.84% while the 2-year rate was at 1.62%.

Gold futures shed 1.2% to settle at $1,465.10 per ounce.