NEW YORK — Shoppers, enticed by heavy discounts and armed with rebate checks, spent more freely in June, helping to lift many retailers' sales. The outlook for the back-to-school season remains tough, though, as consumers confront high gas and food prices, a slumping housing and tighter credit.

As the nation's retailers reported June sales on Thursday, discounters and wholesale club operators including Wal-Mart Stores Inc., BJ's Wholesale Club Inc. and Costco Wholesale Corp. reported better-than-expected figures as consumers limited purchases mainly to groceries and other necessities.

The reports showed that some rebate money made their way to apparel stores, like Children's Place Retail Stores Inc., though sales generally remained sluggish at mall-based apparel stores, including Limited Brands Inc., Gap Inc., and Wet Seal Inc.

"The rebate checks have kicked in this month, and that is trickling into some discretionary areas," said Ken Perkins, president of RetailMetrics LLC, a research company in Swampscott, Mass. But he added that the rebate checks only provide a "one-time bump."

"The back-to-school season is going to be challenging," he said.

June, the second most important month in a retailer's sales calendar, is a time when merchants clear out summer goods to make room for back-to-school merchandise, and clearly, customers were finding some good deals.

Barneys New York is offering up to 75 percent off on designer merchandise, while Banana Republic has discounts of up to 60 percent.

Perkins said the discounts have generally been planned well in advance and stores have been prudent about keeping lean inventory, so the second-quarter earnings results shouldn't be a disaster.

But the picture is definitely weaker. Perkins estimated that second-quarter profits for the 130 companies he tracks are expected to be down 5.6 percent, compared to the 6 percent increase expected at the beginning of the year.

Merchants appear to be more aggressive about discounts than last year, as they aim to pull in consumers who find their paychecks aren't keeping up with rising food and gas prices. Consumers are also struggling with tightening credit, the ongoing housing slump and a weakening job market. Such fears have dragged down consumers' outlook for the economy to the lowest level in at least 40 years, according to the Conference Board.

"People are being way more picky" about clothing purchases, said analyst Jennifer Black.

Adding to the worries about jobs, The Labor Department said Thursday that fewer people signed up for unemployment benefits last week, but not enough to hide continuing erosion in the country's labor market. New applications filed for unemployment insurance fell by a seasonally adjusted 58,000 to 346,000 for the week ending July 5, the government said. A year ago, the figure was lower, at 304,000, showing a continuing weakness in employment conditions.

Given this environment, shoppers are trading down to less expensive stores, benefiting Wal-Mart and other low-price operators.

Wal-Mart reported a robust 5.8 percent gain in same-store sales, or sales at stores opened at least a year, saying economic stimulus checks helped lift overall customer traffic. The results exclude fuel sales. Analysts polled by Thomson Financial expected an increase of 3.8 percent.

The world's largest retailer noted strong gains in grocery, entertainment and health and wellness items and added that warmer weather helped sales in such categories as apparel and toys. It also cited strong sales of flat-panel TVs, underscoring the growing trend that people are staying home more.

Based on strong results, the discounter raised its earnings outlook, but cautioned that "consumers and small business owners remain concerned about the economy, inflation and most of all, higher gas prices." With the last large mailing of economic stimulus checks due this Friday, Wal-Mart said it's difficult to forecast the benefit from the economic stimulus checks through the remainder of the year.

Target Corp., which has not fared as well as Wal-Mart in recent months, reported a 0.4 percent gain in same-store sales. The results were better than the 0.5 percent decline that analysts had expected.

Costco reported a strong 9 percent gain in same-store sales, surpassing the 8.2 percent estimate from Wall Street.

BJ's said its June same-store sales soared 14.5 percent, topping analyst expectations, as sales of both merchandise and gasoline rose sharply. Analysts had expected a 10.9 percent gain.

Among department stores, J.C. Penney Co. posted a 2.4 percent decline in same-store sales in June, a bigger drop than the 1.1 percent decline that analysts had expected.

The women's division was the strongest category during the month, while jewelry and home sectors were weak.

Upscale Nordstrom Inc. reported an 18.6 percent decline in same-store sales, matching analysts' estimates, and warned it may not meet its second-quarter earnings forecast. It blamed higher markdowns and the shift of its spring merchandise clearance sale for women and children into May

Some clothing chains appeared to get some relief from the rebate money.

Women's apparel retailer Cato Corp. said same-store sales rose 4 percent in June, and boosted its earnings outlook.

Children's Place Retail Stores Inc. said same-stores sales rose 16 percent in June, more than double analysts' estimates. Wall Street had expected same-store sales to rise 7.8 percent.

But Limited posted a 9 percent decline in same-store sales, worse than the 7.4 percent decline that analysts had expected.

Gap reported a 7 percent decline in same-store sales, though the results were better than the 11.6 percent decrease that Wall Street had expected.

Wet Seal Inc. had a 2.9 percent decrease in same-store sales, in line with the 3.0 percent drop that analysts had predicted.