Retail, Energy Lead Rally; Oil Near $128

Stocks rallied, with the Dow ending just shy of its session high, after an unexpected drop in jobless claims and solid sales reports from some retailers including Wal-Mart.

A credit-rating downgrade on bond insurers spurred a quick dip but stocks shook it off and jumped back on the rally.

The Dow Jones Industrial Average gained nearly 214 points, or 1.7 percent, to close at 12604.45. The S&P 500 gained 2 percent and the Nasdaq added 1.9 percent.

The top five gainers on the Dow were: Verizon, ExxonMobil, Chevron, American Express and Wal-Mart as oil's surge to near $128 a barrel catapulted energy stocks to the front of the pack.

"The bear is dying," said Al Goldman, chief market strategist at A.G. Edwards. "People are starting to look beyond the valley to better times ahead."

Still, Goldman said, "I think we overdid it today. I don't think we're ready to go up, up and away like Superman."

Tomorrow's jobs report will provide a key test for the market, he said. "If it's a nasty loss [of jobs], it would pull the rug out from under the rally," Goldman said.

Economists expect the report to show nonfarm payrolls shed 58,000 jobslast month, following April's 20,000 decline.

This week's ADP report showed the private sector created 40,000 jobs in May but that figure is often at odds with the government report.

Jobless claims unexpectedly fell by 18,000 last week, though that number was likely skewed by Memorial Day; the four-week moving average of continuing claims jumped to 3.086 million, the highest level in more than four years.

"Expect chaos and potentially big increases next month with much bigger-than- usual auto retooling shutdowns," Ian Shepherdson, chief U.S. economist at High Frequency Economics, wrote in a note to clients.

Retailers delivered May same-store sales and, not surprisingly, discount retailers were the winners. Many department stores and specialty retailers logged declines.

Wal-Mart Hits Four-Year High

Wal-Mart gained 3.7 percent, ending at $59.80, its highest level in four years. The discount giant reported its same-store sales rose 3.9 percent last month, boosted by demand for items like groceries, medicines, flat-panel televisions and computers.

Costco said same-store sales rocketed 9 percent, while BJ's Wholesale Clubs logged an increase of more than 13 percent.

One of the biggest surprises came from teen retailer The Buckle , which nearly tripled expectations with a 35-percent jump in same-store sales.

In a sign of just how desperate the market is for good news, Home Depot shares gained 2.7 percent, ranking it among the top ten Dow gainers, after the company's chairman told analysts that this year was going to be bad but once everything shakes out (no time frame specified) the chain expects double-digit per-share profit growth and sales growth of 3 to 5 percent.

Verizon shot to the top of the Dow, rebounding 5.4 percent after the prior session's slide. The telecom giant confirmed that it will acquire Alltel, the No. 5 wireless provider in the U.S., for $5.9 billion plus the assumption of $22.2 billion in debt. Verizon already owns No. 2 Verizon Wireless; combining Alltel and Verizon would create the No. 1 wireless provider in the U.S., eclipsing AT&T .

The European Central Bank kept its key interest rate unchanged at 4 percent but ECB President Jean-Claude Trichet said the central bank may raise the rate at its next meeting in July to tame inflation.

Trichet's warning shot rattled the dollar and pushed crude back up. Light, sweet crude jumped $5.49, its biggest one-day dollar gain, to settle at $127.79 a barrel.

Natural gas inventories increased by 105 billion cubic feet, slightly higher than expected.

Ambac and MBIA bounced back, with both stocks ending up more than 5 percent, after Standard & Poor's slashed its credit rating on the bond insurers to "AA" from "AAA" and put the ratings on watch. A day earlier, both stocks dropped more than 15 percent on news that Moody's may downgrade its credit ratingson the firms.

Lehman Brothers again rebounded amid increasing optimism about the firm. The stock gained 10 percent in the past two session, after losing 19 percent in the prior two.

Deutsche Bank reiterated its "buy" rating on Lehman stock. That comes a day after Merrill Lynch upgraded its rating on Lehman to "buy" from "underperform." Lehman has taken steps to clean up its balance sheet, slashing its risky debt holdings by as much as 25 percent and raised $8 billion in capital this year to shore up its balance sheet, according to an internal memo obtained by CNBC.

Still, not everyone was convinced.

Brad Hintz, an analyst for Sanford Bernstein who used to be CFO of Lehman, slashed his earnings estimates for Lehmanin the second half and next two years, citing the fact that derivates-trading results have been hurt by clients worried about the credit strength of certain units.

And David Einhorn, who the New York Times called a "rabble-rousing hedge-fund manager," was making the TV rounds again this week, singing Lehman's criticisms. Einhorn, who runs a $6 billion hedge fund called Greenlight Capital, said Lehman is coming under the gun because of the role it played in the mortgage market and its lack of transparency. "Lehman has been one of the deniers,” Einhorn was quoted as saying in the Times.

Airlines Soar on Upgrade

Airlines soared after Lehman upgraded its rating on the sector to "positive." Leading the fleet were Northwest and Delta , both up more than 12 percent.

Continental rose nearly 5 percent after the airline announced plans to eliminate 3,000 jobs, or about 6.5 percent of its workforce and cut domestic flights by 16 percent in the fourth quarter. The carrier said it wouldn't announce destinations affected until late next week.

United Airlines announced plans to slash jobs and flights on Tuesday and American parent AMR announced a similar move last month.

Homebuilders were among the day's few decliners as the sector continued to reel from results earlier in the week from Toll Brothers and Hovnanian . Both reported a quarterly loss; Hovnanian's loss increased tenfold from a year earlier. Both stocks were down more than 2.5 percent.

Honeywell was one of the few decliners on the Dow. The company, which makes everything from cockpit electronics to home air purifiers, is being sued by the Justice Department amid allegations it knowingly sold defective materials for bullet-proof vests used by law-enforcement agencies.

Still to Come:

FRIDAY: Jobs report; wholesale trade; consumer credit; Fed's Evans, Bullard speak; Wal-Mart shareholders meeting

Send comments to cindy.perman@nbcuni.com.