Costco Wholesale Corp.'s (COST) fiscal fourth-quarter earnings fell 6% as the nation's biggest warehouse club continued struggling with weak sales of nonfood products, but profit did beat expectations for the first time this year and recent sales showed improvement.

Costco, which sells items in bulk to its paid members, continued showing strong membership trends and its overall merchandise margin, a measure of profitability, rose from a year ago.

Demonstrating improvement in September, same-store sales for the period were up 1%, while analysts had expected a 0.6% drop, as customer traffic rose 6.5% from a year ago. Chief Financial Officer Richard Galanti said during a conference call that virtually all U.S. regions and product categories showed improvement during the month, although average purchases remained lower because food and fuel prices have come down.

While not offering an earnings outlook, Galanti said that by the end of this month the company may see easier comparisons because gas prices are well past their peak and the dollar's strength has been receding, with the latter helping foreign exchange rates.

Costco is remaining cautious, however, with Galanti saying the company is contending with skyrocketing health-care costs and keeping its expansion for 2010 at about the same level as this year, which saw 16 stores open.

"There is still a lot of unpredictability out there," Galanti said.

Costco, which has been battling consumer-spending cutbacks amid the weak global economy, said profit for the quarter ended Aug. 30, was $374 million, or 85 cents a share, down from $398 million, or $0.90 a share, a year earlier. Total revenue was $22.38 billion, down 3.1%.

Analysts surveyed by Thomson Reuters had projected earnings of 77 cents and revenue of $22.34 billion.

Costo demonstrated it was still drawing customers in a weak environment, with membership fees raising $490 million, up 3.4%, during the quarter. Membership fees represent 75% to 80% of operating profit and bode well for upcoming sales since customers sign on for a period of time.

Even though sales fell from a year ago, merchandise gross margin was up 10.9% from 10.3%

Comparable store sales dropped 5% in the fourth quarter. Excluding the effects of lower gas prices and a stronger dollar during the period, same-store sales rose 1%.

"It feels like they are hitting a turning point," said Joe Feldman, retail analyst at Telsey Advisory Group. "This is the second month in a row we've seen decent sales."

Costco shares were recently up 2.2% at $59.20.

-By Karen Talley, Dow Jones Newswires; 212-416-2196; karen.talley@dowjones.com