Banks led Wall Street to gains on Thursday even as Europe struggled again, a sign investors are betting a relatively strong U.S. economy will help U.S. stocks outperform other markets.

Overall gains were small, but banks advanced for a third day, supported by better-than-expected economic data. U.S. financial shares continued to delink from their European peers as investors see more potential for growth in U.S. lending that could offset worries about the euro zone debt crisis.

The KBW bank index <.BKX> rose 2.2 percent, extending the week's advance to about 6 percent. Bank of America Corp jumped 8.6 percent to $6.31.

While you do have the European issues, the U.S. banks do have some offsets, said John Manley, the New York-based chief equity strategist at Wells Fargo Funds Management.

There are signs of potential stability in the housing market and U.S. banks are probably being helped by that.

Traders initially focused on heavy losses in European bank shares, led by UniCredit . Italy's largest bank has lost more than 30 percent of its value this week after it priced a share offering meant to shore up its ravaged balance sheet.

Other European bank shares fell, and an index of the region's lenders <.SX7P> tumbled 3.24 percent.

But Manley warned that the problems that made bank stocks some of the worst performers last year still linger.

Bank stocks can do well in the very long term, they are cheap stocks, but they are cheap for reasons that will not go away any time soon, he said.

The Dow Jones industrial average <.DJI> dipped 2.72 points, or 0.02 percent, to 12,415.70. The S&P 500 Index <.INX> gained 3.76 points, or 0.29 percent, to 1,281.05. The Nasdaq Composite <.IXIC> added 21.50 points, or 0.81 percent, to 2,669.86.

Data on Thursday pointed to a strengthening U.S. economy. More than twice the expected number of private sector jobs were added in December while initial jobless claims dropped 15,000 in the latest week. In addition, the pace of U.S. services growth quickened more than expected in December.

The S&P 500 closed above its 200-day moving average for a third straight day. It was the first time the index has been able to hold above the moving average that long in five months. But relatively low volumes could undermine the upbeat technical picture.

About 7.2 billion shares changed hands on the New York Stock Exchange, the Nasdaq and Amex, compared with last year's daily average of about 7.84 billion shares.

The Nasdaq was boosted by strength in technology shares. Marvell Technology Group gained 7.3 percent to $15.23 while Seagate Technology Plc was up 6.4 percent to $17.90.

Underscoring investor focus on home builder stocks, the PHLX housing sector index <.HGX> rose 2.3 percent.

The S&P retail index <.RLX> edged up 0.4 percent as December same store sales rose slightly more than expected, though discounts cut into profits over the holiday shopping season. Target Corp fell 3 percent to $48.51 while Macy's Inc added 3.9 percent to $33.92.

Dendreon Corp jumped 39.7 percent to $10.62 after its revenue jumped more than three-fold as sales of its prostate cancer vaccine took off.

Bookstore chain Barnes & Noble Inc fell 17 percent to $11.24 after it said it may split off its Nook electronic reader business and cut its full-year earnings forecast.

Also on the downside, Tesoro Corp tumbled 5.9 percent to $22.60 after it forecast a fourth-quarter loss. The warning sent shares of peers Valero Energy Corp and Marathon Petroleum Corp lower.

On the New York Stock Exchange about three issues advanced for every two that declined and on Nasdaq eight rose for every five that fell.

(Reporting by Rodrigo Campos; editing by Kenneth Barry)