NEW YORK — Consumers gave the nation's stores some relief in February, spending a little more freely, although they mostly gravitated toward discounters and grocers.

The challenge for merchants in coming months is to get shoppers to splurge on spring fashions — a tough task when Americans are worried about plunging home values, tighter credit and rising gas prices.

As retailers reported mixed February sales results Thursday, it was clear that shoppers bought the basics, helping low-price operators like Wal-Mart Stores Inc. and Costco Wholesale Corp. exceed Wall Street expectations after a dismal January and disappointing holiday season. But customers largely shunned mall-based apparel stores, hurting merchants like Gap Inc., Limited Brands Inc. and J.C. Penney Co.

"People are definitely focusing on the core things they need to buy," said Russell Jones, director of AlixPartners, a consulting company. "They may be buying some apparel, but they are no longer buying that extra item that pops their eye."

The UBS-International Council of Shopping Centers' preliminary sales tally of 39 retailers rose 1.9 percent in February, exceeding the estimated growth range of 0.5 percent to 1 percent.

The results, while still sluggish, were helped by Wal-Mart's solid increase and were much better than the previous month's 0.5 percent gain, the industry's weakest January performance in nearly four decades. The tally is based on same-store sales or sales at stores opened at least a year, a measure that's considered a key barometer of a retailer's health.

Wal-Mart reported a 2.6 percent gain in same-store sales. Discount rival Target Corp. said same-store sales rose 0.5 percent.