Stocks rose Monday as Greece's parliament approved strict financial reforms needed to obtain its latest international bailout package.

The deal helps Greece avoid a potentially chaotic default, though the government remains under pressure to convince a skeptical euro zone that it will abide by the terms of the package.

Still, though Greece's economy is small in the context of the euro zone, investors feared that an unruly default could have eroded domestic bank profits and put weaker members of the EU at risk, creating a threat to global economic growth.

Wall Street has rallied more than 20 percent since a closing low reached in early October, in part on optimism that the euro-zone's sovereign debt crisis was nearing resolution. A deal in Greece was expected, setbacks and delays notwithstanding, and the lack of a substantial pullback in that time has some analysts viewing equities as extended.

That the deal was approved really reduces a lot of the tension over the euro zone, but it was expected and on a short-term basis we're very done to the upside, said Yu-Dee Chang, chief trader of ACE Investments in McLean, Virginia.

That's why we're went up and then backed off this morning. I'm cautious because there could be a short-term correction.

The European banking shares index <.SX7P> gained 0.3 percent, and an index of Greek banks <.FTATBNK> surged 12 percent after the vote, which had sparked widespread rioting in Athens. The euro edged up slightly against the dollar.

Financials were the strongest performers on the S&P 500.

Bank of America Corp climbed 2.4 percent to $8.27 and Citigroup Inc advanced 1.4 percent to $33.38. The KBW bank index <.BKX> added 0.9 percent.

The Dow Jones industrial average <.DJI> was up 49.23 points, or 0.38 percent, at 12,850.46. The Standard & Poor's 500 Index <.SPX> was up 6.59 points, or 0.49 percent, at 1,349.23. The Nasdaq Composite Index <.IXIC> was up 19.07 points, or 0.66 percent, at 2,922.95.

The benchmark S&P index traded near the 1,350 level, seen as a resistance point, which some analysts see as a possible trigger for a pullback after a rally of more than 7 percent to start the year.

Apple Inc raised the stakes in an intensifying global patent battle with Samsung Electronics <005930.KS> by targeting Samsung's latest model using Google Inc's fast growing Android software, a move that may affect other Android phone makers.

Apple shares were up 1.3 percent to $499.97, earlier topping $500 for the first time, while Google edged up 1.1 percent to $612.61.

Google is expected to win approval from European regulators, as well as from U.S. antitrust authorities, for its planned $12.5 billion purchase of Motorola Mobility , according to people familiar with the matter.

Regeneron Pharmaceuticals Inc jumped 13 percent to $115.59 after the company significantly raised its 2012 sales forecast for its key eye drug, Eylea.

As earnings season moves into its final stages, 51 companies in the S&P 500 are scheduled to report results this week. According to Thomson Reuters data through Monday, of the 357 companies in the benchmark index that have released results, 64 percent have beat analyst expectations.

President Barack Obama unveiled an election-year U.S. budget plan on Monday that would see a $6.7 trillion increase in the debt over the next decade despite what he called very difficult cuts to government spending and programs.

(Editing by Padraic Cassidy)