Dow Snaps 4-Day Losing Streak; FB Breaks $26

Stocks logged a modest gain in thin-volume trading Tuesday, lifted by a better-than-expected service sector report, but the ongoing uncertainty in the euro zone kept investors nervous.

Meanwhile, Facebook declined almost 4 percent. The social-networking giant is down almost 30 percent from its market debut of $38 a share. Meanwhile, S&P Capital IQ boosted its rating on the company to "hold" from "sell."

S&P 500

The Dow Jones Industrial Average gained 26.49 points, or 0.22 percent, to finish at 12,127.95, breaking its four-day losing streak, led by gains from JPMorgan and H-P . Meanwhile, United Tech slipped.

The S&P 500 rose 7.32 points, or 0.57 percent, to end at 1,285.50. Nasdaq added 18.10 points, or 0.66 percent, to close at 2,778.11.

The CBOE Volatility Index, widely considered the best gauge of fear in the market, closed below 25.

Most key S&P sectors finished higher, led by financials and materials, while telecoms slipped.

“You’re starting to see some signs of stabilization and we saw a key reversal in the dollar on Friday and in bonds yesterday,” said Alan Knuckman, chief trading advisor at “This is not 2008 or 2009—people are getting overblown with this hysteria. We’re down 10 percent off the highs and we’ve given back the gains. We’re not negative on the year; we’re just back to where we started.”

The pace of growth in the services sector picked upin May, with the non-manufacturing index edging up to 53.7, according to the Institute for Supply Management. Economists had expected a reading of 53.5, according to a Reuters poll. A reading above 50 indicates expansion in the sector.

The G7 ministers and central bankers around the world held an emergency call to discuss the euro zone's worsening debt crisis, but no major agreements or plans were formed.

A U.S. Treasury official said the G7 will continue to monitor developments in the euro zone ahead of the G20 summit later this month in Mexico.

“Everyone had false hope that the G7 conference call would turn into something, [but] nothing came out of it,” said Art Cashin, director of floor operations at UBS Financial Services. “Today could be turnaround Tuesday because we had been a bit oversold, but I don’t know if anyone wants to move in front of the ECB tomorrow.”

European shares closed mixed in thin trading. The U.K. market is still closed due to the extended holiday for the Queen’s Diamond Jubilee. (Slideshow: Highlights From the Queen's Diamond Jubilee)

Ratings agency Egan-Jones downgraded the U.K.'s credit ratingfrom double-A to double-A minus late Monday afternoon.

On the M&A front, Oracle said it will acquire Collective Intellect, which helps businesses to get information about consumers from Facebook and Twitter pages. (Disclosure: CNBC and CI announced a strategic content collaboration earlier this year.) This comes a day after rival announced a deal to purchase social media marketing company Buddy Media.

Homebuilders including Pulte , Lennar and DRHorton jumped after a report from CoreLogic said home prices climbed in April.

Hovnanian is scheduled to post earnings after the closing bell tonight.

Investors will also look ahead to the Fed’s April edition of the Beige Book, its region-by-region assessment of the U.S. economy, which is out on Wednesday.

Meanwhile, Australiacut interest rates for the second successive month, with investors hoping this will herald stimulus measures from other governments around the globe.

—By CNBC’s JeeYeon Park (Follow JeeYeon on Twitter: @JeeYeonParkCNBC)

Coming Up This Week:

WEDNESDAY: Weekly mortgage apps, ECB announcement, productivity and costs, oil inventories, Fed's Beige Book, Fed's Lockhart speaks, Fed's Lockhart speaks, Fed Basel III vote
THURSDAY: Bank of England announcement, jobless claims, Bernanke speaks, quarterly services survey, Fed's Lockhart speaks, Fed's Kocherlakota speaks, consumer credit; Earnings from Lululemon Athletica, JM Smucker
FRIDAY: International trade, wholesale trade, Fed's Kocherlakota speaks, Chesapeake annual meeting

More From