U.S. stocks rose in choppy trading on Thursday as European leaders pledged help for debt-ridden Greece, removing some uncertainty about a possible sovereign default.

U.S. economic data helped support the market as first-time applications for jobless insurance fell more than expected in the latest week, a signal the labor market continues to mend.

Stock market gainers included 3M Co , up 1.6 percent to $79.85 after a broker upgrade, and Caterpillar Inc , up 3.1 percent to $54.77 and the top boost to the Dow industrials.

European leaders sealed a deal to provide financial aid to Greece, but details on the package were not expected until early next week.

Concern over the debt troubles in Greece has dampened confidence of late, and equity markets have been sensitive to statements and reports of potential aid.

The fact that there's at least some positive commentary is making people feel a little bit relieved the Greek situation, at least in the short term, doesn't appear to likely worsen, said Michael James, senior trader at Wedbush Morgan in Los Angeles.

Given the relatively oversold condition in the market, people are feeling better about committing capital to equities right now.

The S&P was down more than 4 percent for the year at the close on Wednesday and posted had four consecutive weekly losses.

The Dow Jones industrial average <.DJI> gained 93.34 points, or 0.93 percent, to 10,131.72. The Standard & Poor's 500 Index <.SPX> added 8.14 points, or 0.76 percent, to 1,076.27. The Nasdaq Composite Index <.IXIC> jumped 24.95 points, or 1.16 percent, to 2,172.82.

Activision Blizzard Inc shares jumped 8.3 percent to $10.88 and helped boost the Nasdaq 100 <.NDX> after it posted better-than-expected results and said it would start paying an annual dividend.

3M Co shares jumped after Sanford C. Bernstein upgraded the company to outperform from market-perform, citing better margins and a higher growth rate.

(Editing by Padraic Cassidy)