NEW YORK – Shuttering stores, laying off workers and cutting other costs helped Starbucks Corp. beat Wall Street's profit expectations for its fiscal third quarter Tuesday, but the recession continued to drain sales away from the gourmet coffee chain.

Investors cheered the results anyway, sending shares up $1.46, or 9.9 percent, to $16.15 in electronic after-hours trading. During regular trading before the results were released, the stock fell 23 cents to $14.69.

CEO Howard Schultz said on a conference call with investors that the quarter's results showed "positive momentum," but there was more work to be done to turn around a company that once was a Wall Street darling for its consistent earnings and sales growth.

"A lot of hard work lies ahead," Schultz said. "One quarter does not make a trend."

The Seattle-based gourmet coffee chain earned $151.5 million, or 20 cents per share, compared with a loss of $6.7 million, or 1 cent per share a year earlier.

Excluding costs for closing underperforming stores and other special items, Starbucks earned 24 cents per share, compared with 16 cents per share a year earlier. Revenue fell 7 percent to $2.40 billion.

Analysts polled by Thomson Reuters expected profit of 19 cents per share, excluding special items, and revenue of $2.37 billion.

Starbucks' same-store sales — sales at stores open more than a year — dropped 6 percent in the U.S. and 5 percent worldwide. The number of transactions and their average value both slipped.

On the positive side, sales improved each month during the quarter, and the third-quarter sales decline was less steep than the second quarter's 8 percent drop.

Starbucks has introduced instant coffee, changed its food recipes and begun a multimillion dollar ad campaign to keep customers from defecting to lower-priced competitors like McDonald's Corp., which is rolling out espresso drinks to its 14,000 U.S. restaurants.

"Starbucks is going to have to play some pretty good defense," Edward Jones analyst Jack Russo said, pointing to rising competition in the specialty coffee sector.

On the call, Schultz said the "extraordinary advertising dollars" competitors spent during the quarter did not hit Starbucks' sales.

"It appears that the various marketing campaigns, and all the media coverage about coffee, has created unprecedented awareness for the coffee category overall and has actually had a positive result on Starbucks' business," he said.

Still, the beat came largely from the quarter's 15 percent drop in operating expenses, including layoffs of support staff, trims in Starbucks' general and administrative expenses, lower dairy costs and the closing of 676 U.S. stores, 61 stores in Australia and 28 stores in other countries.

Schultz did not introduce any initiatives on the call but said Starbucks will update its packaging for the coffee it sells in grocery stores to include a coupon for free brewed coffee in its retail stores.

Chief Financial Officer Troy Alstead said greater-than-expected savings at the store level in labor and other expenses have allowed Starbucks to cut costs by $370 million since January. The company now expects to save $550 million in 2009, up from $500 million.

Analyst Russo said the company is doing what it should to cut costs but those "are some of the easier decisions to make"; determining how to grow sales is far more difficult, he said.

Starbucks said the rest of the planned 800 U.S. store closures are expected to occur by Sept. 27 — the end of the company's fiscal year. And 72 more stores are to close abroad by mid-2010, for a total of 961 closures. Last month, 16,729 Starbucks stores were operating around the world.

The company expects to earn between 44 cents and 45 cents per share, or 74 cents to 75 cents per share excluding one-time items, for fiscal 2009. Analysts, who usually exclude one-time items, predict profit of 70 cents per share for the year.

For 2010, Starbucks said its profit will grow between 13 percent and 18 percent, excluding restructuring charges.