NEW YORK (CNNMoney.com) -- Wal-Mart reported a much better-than-expected jump in August sales Thursday while last-minute shopping for back-to-school clothes, shoes, and other items also spurred sales at store chains catering to teens.

Wal-Mart (Charts, Fortune 500), the world's largest retailer, said sales at its stores open at least a year, a key gauge of retail performance known as same-store sales, increased 3.1 percent last month.

The retailer had earlier forecast sales to increase 1 to 2 percent in August. Its total sales rose 9.3 percent to $28.2 billion.

For September, the company said it expects same-store sales to rise 1 to 3 percent.

The retailer said back-to-school categories had solid sales performance, with strength in electronics, school supplies and children's apparel. Sales of laptops and calculators did well, and discounts on bedding, bath towels and plastic storage items boosted purchases of those items.

"We are pleased with our performance during August, because it reflects continuing momentum in grocery and electronics," Wal-Mart Stores CEO Eduardo Castro-Wright said in a statement. "Home and apparel are expected to continue improving into the fourth quarter."

Sales at Wal-Mart's rival Target (Charts, Fortune 500) rose 6.1 percent in August, outpacing its own estimate for a 4 to 6 percent increase for the month.

In the specialty clothing space, Pacific Sunwear (Charts) posted a 9.6 percent jump in its sales last month, while American Eagle Outfitters also logged a strong 9 percent sales gain in the period.

Sales at Hot Topic, seller of music and Goth-inspired clothes, fell 1.1 percent, but that dip was still better than analysts' expectations for a 2.5 percent decline.

Gap Inc. (Charts, Fortune 500), the No. 1 clothing chain, saw a 1 percent slide in its same-store sales, which was also better than analysts' forecasts for a 2.3 percent decrease.

And high-end sellers continued their winning streak, with Nordstrom posting a strong percentage sales increase.

Thomson Financial, which compares sales at 47 retail chains, said August same-store sales overall rose 3.1 percent, better than its earlier forecast for a 2.5 percent gain, but still fell short of last year's 3.3 percent increase.

Despite the last month's positive performances, one retail industry analyst said he's still concerned about consumers' ability to keep spending in the weeks ahead leading into the all-important holiday sales period.

The November-December period accounts for as much as 50 percent of retailers' annual profits and sales.

"Last month's sales numbers weren't exactly blowout numbers," said Ken Perkins, president of Retail Metrics. "We're not seeing this as a trend that will continue in the months ahead."

For one thing, he said retailers are up against some very tough sales comparisons in September. "It's going to be hard for retailers to overcome last year's very strong sales in September," he said.

"With the housing market problems, mortgage issues and tightening credit standards, it will become for difficult for consumers to spend heading into the Christmas season," he added.

The weak spots

Costco (Charts, Fortune 500), the largest wholesale club retailer, reported a weaker-than-expected 2 percent gain in its August sales Wednesday. The company blamed a hot weather spell in its California market for weaker traffic at its stores in the region.

The dip wasn't a surprise, especially after Penney warned last month that it expected same-store sales to fall in the low single-digits due to a "calendar shift" that pulled some of early August sales into the last week of July.