NEW YORK - Tax-rebate checks gave consumers a little extra money in their pockets during May, but most still spent conservatively, buying necessities such as food and gasoline and shying away from splurging on clothing or furniture.

Results announced yesterday by major retailers showed better-than-expected sales for the month, with lower-priced merchants such as discounters and wholesale clubs showing the strongest gains.

Costco Wholesale Corp. and Wal-Mart Stores Inc., for example, were among the strongest performers. But fewer rebate dollars made their way to the malls, so retailers such as Gap Inc. missed expectations.

"It was a great month for discount retailers, but the rest of retail is struggling to capture a share of the consumer's wallet," said Patricia Edwards, a portfolio manager and retail analyst at Wentworth, Hauser & Violich Inc., of Seattle.

Even so, the overall results were better than the gloomy May analysts had predicted as consumers still shopped despite rising energy costs, declining home values, and tightening credit. Some analysts saw glimmers of a possible pickup in business later this year. And the federal tax-rebate checks helped offset rising gasoline prices, said Ken Perkins, president of RetailMetrics L.L.C., a research company in Swampscott, Mass.

"It certainly looks as though gas tanks didn't siphon off all of the rebate stimulus," he said. "Consumers were able to spend in May."

As of May 30, the Treasury Department said, 57.43 million tax-rebate payments had been sent out, totaling $50.041 billion - just below half the $106.7 billion the government expects to provide.

Wal-Mart was one of the few retailers to specifically mention a benefit from stimulus checks. The world's largest retailer said yesterday that same-store sales - those at outlets open at least a year, a key retail yardstick - rose 3.9 percent, while analysts surveyed by Thomson Financial had predicted a 1.6 percent rise.

Wal-Mart's chief financial officer, Tom Schoewe, told reporters at a media gathering in Rogers, Ark., that $350 million in tax-rebate checks had been cashed in the company's stores so far, though he did not know what percentage of that money was actually spent at Wal-Mart. He said the rebate money, along with an improvement in Wal-Mart's merchandise, had helped May sales results surpass expectations.

Rival Target Corp., which has a somewhat more upscale clientele, said same-store sales fell 0.7 percent; analysts had expected a 0.2 percent drop. Health care, electronics and perishables were the company's strongest sales categories in May, while men's apparel, jewelry, and lawn and patio sales were weakest.

Costco said same-store sales rose 9 percent, ahead of the 6.9 percent analysts expected.

J.C. Penney Co. Inc. said same-store sales fell 4.4 percent, better than the 5.8 percent drop analysts had expected. Retailer Saks Inc. said same-store sales fell 8.7 percent.

Mall-based apparel stores continued to struggle.

Limited Brands Inc. said same-store sales fell 6 percent, worse than the 5.5 percent drop analysts had expected. Gap Inc.'s same-store sales fell 14 percent, hurt by results from its Old Navy stores. The result was worse than the 9.5 percent decline analysts had expected.