Stocks advanced on Thursday, powered by financials after Morgan Stanley reported better-than-expected results and on apparent progress on debt deals in Europe and the United States.

Financials led all S&P sectors, boosted by Morgan Stanley , which posted a narrower-than-expected loss and outperformed rival Goldman Sachs Group Inc despite tough trading conditions.

The KBW Capital Markets index <.KSX> rose 2.8 percent and Morgan Stanley surged 11.4 percent to $24.20.

You've got a bunch of items that at least short term have given buyers reason to buy and some sellers reason to step away from selling, (giving) a lift to the market, said Rick Bensignor, chief market strategist at Dahlman Rose in New York.

The fact financials are getting a bid and outperforming for a couple of days, the potential for some type of temporary workout for the Greek default situation and the fact that we seemingly here in the U.S. are getting potentially closer to solving the problem of the debt ceiling are helping stocks.

The Dow Jones industrial average <.DJI> gained 147.92 points, or 1.18 percent, to 12,719.83. The Standard & Poor's 500 Index <.SPX> rose 17.95 points, or 1.35 percent, to 1,343.79. The Nasdaq Composite Index <.IXIC> climbed 20.22 points, or 0.72 percent, to 2,834.45.

Stocks moved to session highs after the White House said it saw momentum for a balanced deficit deal, but denied reports that U.S. President Barack Obama and Republican U.S. House of Representatives speaker John Boehner were close to a pact.

Standard & Poor's were to meet with first-term Republican lawmakers to discuss what could cause the rating agency to downgrade the country's top credit rating, a source said.

Euro zone leaders were set to give a financial rescue fund sweeping new powers to prevent contagion and help Greece overcome its debt crisis, according to the draft conclusions of an emergency summit.

Transportation shares also led the market after Union Pacific Corp posted higher quarterly profits. Shares of the railroad company rose 4.5 percent to $104.31, and the Dow Jones transport index <.DJT> was up 1.8 percent.

Biotechnology issues also moved higher. Alexion Pharmaceuticals Inc jumped 9.1 percent to $56.77 after the drugmaker posted better-than-expected quarterly earnings and raised its 2011 outlook. The NYSEArca biotech index <.BTK> climbed 2 percent.

On the downside, Dow component Intel Corp fell 1.5 percent to $22.64, a day after the chipmaker trimmed its forecast for 2011 personal computer unit sales.

(Reporting by Chuck Mikolajczak; editing by Jeffrey Benkoe)