NEW YORK (MarketWatch) — U.S. stocks surged Friday, with the Dow extending its longest weekly winning streak of 2012, after July jobs data beat expectations and investors found reason for cheer on Europe.

The nonfarm payrolls report “put traders in a good mood, after four days of being in a bad mood,” said Ron Florance, managing director of investment strategy for Wells Fargo Private Bank, of the market’s best session in more than a month.

“Our markets are nicely in the green today, and we have to give some of the credit to Europe,” said John De Clue, a regional investment director at U.S. Bank, citing behind-the-scene efforts by European leaders to put a concrete plan together.

European Central Bank President Mario Draghi “all but said the ECB may reactivate the program where they step in to buy the bonds of peripheral countries to drive interest rates down,” said De Clue.

“The euro is up 1.6% to the dollar; that’s a huge move and a clear indication money is rotating,” said De Clue, who added that investors, hedge funds in particular, did not want to hold overly short positions on Europe headed into the weekend.

Tallying its fourth weekly rise, the Dow Jones Industrial Average DJIA, -0.47% rose 217.29 points, or 1.7%, to 13,096.17, up 0.2% from last Friday’s close.

Also extending its winning run into a fourth week, and up 0.4% from last Friday’s close, the S&P 500 index SPX, -0.48% climbed 25.99 points, or 1.9%, to 1,390.99, with the financial sector the strongest performer and telecommunications the weakest of its 10 major industry groups.

Knight Capital Group Inc. KCG shares rallied after the Wall Street Journal reported the firm told some customers it had received a credit line after a $440 million trading loss caused by a technical glitch.

The Nasdaq Composite COMP, -0.29% added 58.13 points, or 2%, to 2,967.90, a level that left it with a 0.3% rise for the week.

For every stock sliding five gained on the New York Stock Exchange, where composite volume topped 3.7 billion. Nasdaq Composite volume surpassed 1.7 billion shares.

163,000 nonfarm jobs added in July

Treasury prices fell, with the yield on the benchmark 10-year note TMUBMUSD10Y, 0.655% used in determining mortgages and other consumer loans rising to 1.579%.

Oil prices CLU22, -2.20% rallied nearly 5% to $91.40 a barrel on the New York Mercantile Exchange.

Pain in Spain

On Thursday, U.S. stocks fell sharply after the ECB’s Draghi offered only conditional moves in tackling Europe’s debt crisis.

“There was a legitimate disappointment that Draghi didn’t come out with his bazooka, but we still think it will come in time, maybe after Labor Day,” said Phil Orlando, equity market strategist at Federated Investors.

On Friday, a stock-index futures rally was well underway before the release of the July jobs report as investors adopted the view that the negative reaction to Draghi’s news conference the prior day had been overdone. Speculation that Spain might soon make a formal rescue request also bolstered sentiment, with Spanish borrowing costs falling to levels viewed as more sustainable.

Spanish Prime Minister Mariano Rajoy on Friday repeated Spain was finding it more difficult to refinance its debt, but also said he hasn’t decided whether to call for Europe’s help, Reuters reported.

“The pressure can only mount going forward as the ECB works on designing what Draghi called ‘appropriate modalities’ for a policy response,” Marc Chandler, global head of currency strategy at Brown Brothers Harriman, wrote in a note, citing media accounts that Italy’s prime minister was encouraging Rajoy to make a formal request.

Fiscal cliff

Sentiment brightened further with U.S. economic data.

“We got a much more optimistic labor report, and ISM was expected to be down and it was up,” said Orlando. “The 163 print is the best number in about five months,” added Orlando of the 163,000 increase in payrolls.

The unemployment rate, which is calculated from a different survey, climbed to 8.3%. Read full report on July jobs.

And, the Institute for Supply Management’s index of U.S. non-manufacturing activity rose to 52.6 in July from 52.1 in June, with any number above 50 indicating expansion. See details.

“It’s encouraging that we’re moving in the right direction, but very discouraging the velocity of the recovery is not enough to fix the problem,” said Wells Fargo Private Bank’s Florance of possible across-the-board tax increases and spending cuts taking effect at the start of 2013.

“The number one priority is clarity, once the rules are set, capitalism can adjust to it,” said Florance, who believes the issue is keeping a lid on economic activity, including hiring by businesses.

“What’s interesting about the fiscal cliff is that in November and December, this president will still be president and this Congress will still be in office. Yet there is no realistic bipartisan compromise negotiation going on,” he said.