Stocks advanced on Friday after another strong monthly jobs report showed the economic recovery was expanding.

Underpinning the bullish sentiment, Greece completed the negotiation of the biggest sovereign debt restructuring in history, an issue that has kept investors skittish.

The S&P 500 faced strong technical resistance as it approached its highest level in nearly four years.

Bank shares, among the most sensitive to growth expectations and the euro-zone crisis, led the gains. The KBW bank index <.BKX> rose 1.6 percent with Citigroup up 1.8 percent at $34.59 and JPMorgan Chase up 2.1 percent at $41.29.

There's a greater sense of confidence with the jobs number that we got, better hope for continued economic growth, said Michael James, senior trader at Wedbush Morgan in Los Angeles.

He said the Greek deal also helps lift stocks as it removes a little bit of European financial risk from the markets in the short term.

Despite a broad rally in the U.S. dollar, which could pressure the prices of greenback-denominated commodities, an index of basic materials shares <.GSPM> advanced alongside the Reuters/Jefferies commodities index <.CRB>. The gains underscore the current focus on the U.S. economic recovery.

The Dow Jones industrial average <.DJI> added 39.17 points, or 0.30 percent, to 12,947.11. The S&P 500 Index <.INX> gained 7.75 points, or 0.57 percent, to 1,373.66. The Nasdaq Composite <.IXIC> rose 20.31 points, or 0.68 percent, to 2,990.73.

Exactly three years ago, the S&P 500 posted a 12-year closing low at 676.53 during the height of the financial crisis. The index has more than doubled since then, although it stalled last year before resuming a rally in 2012.

U.S. employers added 227,000 jobs to their payrolls in February, government data showed, while the unemployment rate held at a three-year low of 8.3 percent even as people flooded back into the labor force to hunt for jobs.

Shares of Monster Worldwide Inc , an online employment agency whose stock is sensitive to changes in the employment outlook, rose 5.1 percent to $9.05.

More than 80 percent of the issues in the S&P consumer discretionary sector index <.GSPD> rose, underscoring investors' bets that the jobs recovery will boost consumer spending, a pillar of the U.S. economy. The sector's index rose 0.7 percent.

Strength in homebuilders' shares, seen earlier in the week, continued, with the Dow Jones U.S. home construction index <.DJUSHB> up 4.1 percent. Credit Suisse raised its recommendation on three big U.S. home builders - DR Horton , Lennar and Toll Brothers - to outperform from neutral.

In the beverage sector, though, Green Mountain Coffee Roasters Inc sank 15.8 percent to $52.52 on fears it may lose its near monopoly in the U.S. single-cup coffee market after Starbucks Corp outlined plans to launch a rival coffee machine. Starbucks rose 3.6 percent to $52.15.

Among the signs that China's economy appears likely to avoid a hard landing, the country's annual rate of consumer inflation slowed to a 20-month low in February, while factory output and retail sales also cooled. The data give policymakers ample room to further loosen monetary policy, analysts said.

(Reporting by Rodrigo Campos; Editing by Jan Paschal)