Stocks rose for a third day on Tuesday on efforts by euro-zone officials to solidify the region's rescue fund and alleviate a sovereign debt crisis, boosting optimism.

But equities ended off their highs for the day after a report suggested cracks were emerging in a previously agreed deal to tackle the crisis.

A successful solution to Europe's sovereign debt crisis would take the pressure off banks worried about funding and remove a threat to economic growth. Rising hopes for an agreement have helped push the S&P 500 up more than 4 percent since Thursday's close.

That's the biggest three-day percentage gain by the S&P 500

since mid-August. So far this week, the CBOE volatility index is down more than 10 percent.

It's great to see some steps toward resolution. Shoring up banks and dealing with the region's fiscal issues is a real positive for equities, said Malcolm Polley, president and chief investment officer of Stewart Capital Advisors in Indiana, Pennsylvania.

The Dow Jones industrial average finished up 146.83 points, or 1.33 percent, at 11,190.69. The Standard & Poor's 500 Index was up 12.44 points, or 1.07 percent, at 1,175.39. The Nasdaq Composite Index was up 30.14 points, or 1.20 percent, at 2,546.83.

The S&P materials index was up 2.1 percent and an S&P index of energy stocks added 1.5 percent as commodity prices rallied on hopes of a solution in Europe. Mining and energy shares were the top performers among large-cap stocks.

While European officials have considered various approaches to maximize the bailout fund and to recapitalize banks, substantial political hurdles to sealing the deal remain.

The Financial Times reported a split was developing in the euro zone over the terms of the next bailout for Greece. However, this had been reported earlier in the day.

German and French government economic advisers urged in a joint article on Tuesday that Greece be allowed to write off around 50 percent of its debt and called for support for banks with large Greek holdings. [nL5E7KR0JX]

Market volatility could remain high as traders react to headlines and attempt to gauge the commitment of governments and institutions as they work to prevent a Greek default. U.S. equities have been highly sensitive to Europe's debt issues in recent weeks.

If there was no resolution, that would create a capital hole which would put more pressure on the global financial system and make things worse here, Polley said.

The S&P has gained 3.4 percent so far this week, after losing 6.5 percent on European-led fears the previous week. That week was also the Dow's worst since October 2008 during the thick of the financial crisis.

Stocks also got a boost as investors rebalanced their portfolios in the last days of the quarter. The wide gap in performance between equities and bonds, favoring government debt so far this quarter, may partly reverse.

All these end-of-quarter issues are amplifying the moves that we've been seeing in stocks, said Paul Simon, chief investment officer at Tactical Allocation Group in Birmingham, Michigan. I don't have a lot of faith in the moves we've been seeing.

Accenture Plc, a tech services company, rose 3.5 percent to $55.55 in extended trading after the market's close and it reported quarterly earnings that beat expectations. The company gave a 2012 outlook that topped consensus forecasts.

Payroll processor Paychex Inc rose 1.9 percent to $27.20 after the closing bell following stronger-than-expected earnings.

U.S.-listed shares of Research in Motion surged on market speculation that investor Carl Icahn had taken a stake in the BlackBerry maker. The stock was one of the top gainers in the Nasdaq 100, climbing 4.5 percent to $22.65.

Walgreen Co fell 6.3 percent to $33.77 after it signaled that it wouldn't budge in its battle with Express Scripts Inc over what the pharmacy benefits manager will pay for prescriptions. Express Scripts rose 0.9 percent to $39.68.

Almost five stocks rose for every one that fell on the New York Stock Exchange, while about 73 percent of Nasdaq issues ended in positive territory. About 9.04 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, above last year's daily average of 8.47 billion.

(Reporting by Ryan Vlastelica; Editing by Kenneth Barry)