A surprisingly strong U.S. jobs report put investors in a buying mood Friday, driving stocks on Wall Street broadly higher and extending the market’s winning streak to a third day.

The rally pushed the Dow Jones Industrial Average up by more than 300 points and erased the S&P 500’s losses from earlier in the week, nudging the benchmark index to a second consecutive weekly gain.

Technology, financial and industrial stocks drove much of the gains. Utilities, a safe-play sector, were the only laggard. Bond yields rose.

The Labor Department said employers added 266,000 positions, well above estimates of 184,000.

The report also showed unemployment falling to a 50-year low. Separately, an index that measures how consumers feel about the economy showed an increase from last month.

The S&P 500 rose 28.48 points, or 0.9%, to 3,145.91. The index posted a 0.2% gain for the week, a solid pivot from losses of more than 1% as of late Thursday.

The latest gains also helped stem some of the losses for the Dow and Nasdaq.

The Dow climbed 337.27 points, or 1.2%, to 28,015.06.

The Nasdaq gained 85.83 points, or 1%, to 8,656.53. The Russell 2000 index of smaller company stocks picked up 19 points, or 1.2%, to 1,633.84.