Stocks fell from their best levels Monday following a report that all 17 euro zone nations were told their ratings will be put on downgrade watch by the S&P, but still logged a modest gain at the close.
Stocks had rallied earlier after France and Germany's leaders said they had completed an agreement on a plan to help resolve the euro zone debt crisis.
The Dow Jones Industrial Average rose 78.41 points, or 0.65 percent, to finish at 12,097.83, led by JPMorgan and BofA .
The S&P 500 added 12.80 points, or 1.03 percent, to end at 1,257.08. The Nasdaq gained 28.83 points, or 1.10 percent, to close at 2,655.76. With the day's gains, the Nasdaq is now in the black for the year, along with the Dow.
The CBOE Volatility Index, widely considered the best gauge of fear in the market, finished above 27.
Most S&P sectors finished higher, led by financials and techs.
S&P is planning to put all 17 euro zone nations—not just the top six as previously reported by the Financial Times—on warning for a possible downgrade after 4pm ET, as a result of the deepening debt crisis, according to the Wall Street Journal. The move implies the possibility of a downgrade within 90 days.
S&P declined to comment.
“This is a natural consequence if France and Germany bails everyone else out because the EU is a fully shared fiscal and monetary union,” said Brian Battle, director and vice president of trading at Performance Trust Capital Partners.
Earlier, France's Nicolas Sarkozy and Germany's Angela Merkel said they had completed an agreement on a plan to help resolve the euro zone debt crisis ahead of a crucial EU summit later on this week.
Both the French and German leaders called for treaty changesaimed at applying stiff sanctions to fiscally wayward national governments.
Although Germany wants these changes to all 27 members of the EU, Sarkozy said the changes could be limited to just the 17 countries who use the euro. In addition, Sarkozy said he wants the treaty changes concluded by March.
And the IMF board approved a 2.2 billion euro loan installment for Greece, part of a 8 billion euro tranche that the debt-ridden nation was expecting to get back in September.
Meanwhile, investors were also encouraged after Italy's Prime Minister Mario Monti unveiled a 30 billion euro austerity packageto Italy's parliament to help stem the nation's sovereign debt crisis.
On the economic front, the pace of growth in the U.S. services sector fell in November to the slowest since January 2010, according to the Institute for Supply Management. And factory goods slipped for the second straight month, according to the Commerce Department.
“The markets will grab onto any information even when there’s not much information, so I think we’re still riding the economic news from last week on the employment numbers and consumer confidence,” said Bill Hampel, chief economist at CUNA.
Barring any overly negative news from Europe, Hampel said he expects a boost in consumer and business spending in the next few months.
“We now strongly appear to have dodged the bullet of a double-dip recession...[The economic trend] seems to be moving in the right direction so it appears that numbers are likely to surprise on the upside than downside.”
In corporate news, Germany's SAP announced a $3.4 billion cash dealto buy U.S. web-based software company SuccessFactors , joining the scramble among technology firms to offer cloud-computing services to businesses.
Rival Taleo surged 20 percent following the aquisition news.
Samsung Electronics gained after Apple failed in a bidto halt U.S. sales of the Korean tech giant's Galaxy line of products.
U.S. metals recycler Commercial Metals rejected billionaire investor Carl Icahn's buyout bid, saying the offer substantially undervalues the company and is "opportunistic."
Among earnings, Dollar General gained after the discount retailer boosted its full-year earnings outlook and posted a profit that topped estimates, helped by strong sales.
Elsewhere, China's services sector cooled in November to its weakest growth in three months, according to the HSBC purchasing managers' index, the latest data portraying an economy slowing quickly and in need of policy support.
—Follow JeeYeon Park on Twitter: twitter.com/JeeYeonParkCNBC—
On Tap This Week:
TUESDAY: AmEx CEO speaks, GE Capital investor mtg; Earnings from Toll Brothers
WEDNESDAY: Weekly mortgage applications, quarterly services survey, oil inventories, consumer credit
THURSDAY: BoE announcement, ECB announcement, McDonald's sales report, jobless claims, wholesale trade, AT&T CEO speaks; Earnings from Costco, Smithfield Foods
FRIDAY: International trade, consumer sentiment, Greek short selling ban expires, EU summit
More From CNBC.com: