Stocks climbed on Monday, as the S&P 500 bounced off a key support level and Greece got an ultimatum from euro-zone ministers in the latest effort to deal with its debt crisis.

Euro-zone finance ministers gave Greece two weeks from Monday to approve stricter austerity measures in return for another 12 billion euros in emergency loans, piling pressure on Athens to get its ragged finances in order.

Even though the EU is talking tough, it looks like things are going to come through in terms of providing additional funding, at least through the end of this year, and probably something will come together on the broader package as well, said Peter Jankovskis, co-chief investment officer of OakBrook Investments LLC in Lisle, Illinois.

Wall Street opened lower, but erased losses as the S&P 500 dipped toward 1,259.78, its 200-day moving average, encouraging buyers. A drop below that level would be the first since September 2010.

The fact we bounced off the 200-day (moving average) and we are moving higher, and the VIX is kind of coming off a little bit, so that fear in the market seems to be subsiding. It's all a positive thing, in terms of technically for the market, said Ken Polcari, managing director at ICAP Equities in New York.

But you get a really negative headline out of Europe, and it all goes away.

The Dow Jones industrial average <.DJI> gained 85.30 points, or 0.71 percent, to 12,089.66. The Standard & Poor's 500 Index <.SPX> climbed 8.03 points, or 0.63 percent, to 1,279.53. The Nasdaq Composite Index <.IXIC> rose 17.02 points, or 0.65 percent, to 2,633.50.

The CBOE Volatility Index <.VIX>, known as the VIX, slid 6.7 percent to 20.38, it's biggest drop in a month.

The euro-zone finance ministers expect the money, the next tranche in a 110-billion-euro bailout of Greece by the European Union and the International Monetary Fund, to be paid by mid-July. Greece needs the loans by then to avoid a debt default.

In company news, the U.S. Food and Drug Administration approved a tamper-resistant pain drug from Pfizer Inc

and Acura Pharmaceuticals Inc . Acura shares jumped 27.4 percent to $4.93, while shares of Pfizer, a Dow component, slipped 0.3 percent to $20.20.

Wal-Mart Stores Incx gained 0.4 percent to $53.05 after the U.S. Supreme Court ruled for the retail giant in the largest sex-discrimination lawsuit in history, saying class-action status for female employees seeking billions of dollars had been improperly granted.

Volume was light with about 2.61 billion shares traded on the New York Stock Exchange, NYSE Amex and Nasdaq, tracking well below the daily average of 7.55 billion.

(Reporting by Chuck Mikolajczak; Editing by Jan Paschal)