Stocks advanced on Thursday led by banks after Morgan Stanley reported better-than-expected results and as details of a new Greece rescue plan emerged.

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 S&P Financial Index <.GSPF> rose 2.7 percent and Morgan Stanley was up 10.4 percent to $23.98.

Obviously good earnings reports are underpinning the market today, said Janna Sampson, co-chief investment officer at OakBrook Investments LLC in Lisle, Illinois. If you disappoint, which Yahoo did for instance, you're going to get punished. But overall we see that earnings reports are continuing to surprise to the upside.

The Dow Jones industrial average <.DJI> was up 173.58 points, or 1.38 percent, at 12,745.49. The Standard & Poor's 500 Index <.SPX> was up 20.33 points, or 1.53 percent, at 1,346.17. The Nasdaq Composite Index <.IXIC> was up 26.36 points, or 0.94 percent, at 2,840.59.

Investors were cheered by a report the European Central Bank is willing to let Greece default on its sovereign debt, a major step toward a deal to alleviate the country's debt crisis. Slow progress on resolving the region's sovereign debt woes has been a major headwind for U.S. equities.

The news from Europe is significant enough to cause a little relief, said Warren West, principal at Greentree Brokerage Services in Philadelphia. Whether it is going to resolve all the issues, I couldn't tell you. Would it be enough to sustain the market? Doubtful.

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

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

Network equipment maker F5 Networks Inc tumbled 10 percent to $100.30 after it forecast fourth-quarter profit in line with estimates, disappointing investors, and cautioned about uncertainty in the European market.

Chinese manufacturing contracted for the first time in a year in July, data showed, as tighter monetary policy and sluggish global demand weighed on the economy.

In the latest economic data, new U.S. claims for unemployment benefits rose more than expected last week, the government said. Markets barely reacted after the report came out.

(Editing by Jeffrey Benkoe)