Wal-Mart Stores Inc. reported U.S. sales fell for the ninth consecutive quarter as the weak economy and expensive gasoline burdened customers, though the world’s biggest retailer said it expects results to improve later this year, with groceries a “key driver” of store traffic.

The economy “remains challenging for our core customers,” Bill Simon, chief executive of the Wal-Mart’s U.S. operations, said during a pre-recorded conference call released Aug. 17 along with quarterly financial results.

Wal-Mart’s customers are consolidating trips due to higher gasoline prices, Simon said, and he also noted an increase in the number of people relying on government assistance for food.

“Customers remain under continued pressure and are trading down to lower price points and smaller pack sizes,” he said.

Still, Wal-Mart’s grocery business “continued its positive trend,” Simon said, as comparable-store sales rose by low single-digits, in percentage terms, during the quarter. “Food remains a key traffic driver to our stores,” he said.

Wal-Mart expanded its grocery business in recent years, and most of its more than 3,800 U.S. stores now offer fruits, vegetables and other fresh foods.

Including the Sam’s Clubs warehouse chain, Wal-Mart sells more food in the U.S. than the country’s three largest traditional supermarket chains – Kroger Co., Safeway, Inc., and Supervalu Inc. – combined.

But Wal-Mart’s U.S. overall sales slumped during the past two years as the economy recovered slowly from the 2008-09 recession and consumers increasingly sought bargains at dollar stores and other discounters.

More recently, gasoline near $4 a gallon squeezed Wal-Mart’s customers.

Comparable U.S. store sales excluding gasoline fell 0.9% during the 13 weeks ending July 29 compared with the same period a year earlier, Bentonville, Ark.-based Wal-Mart reported Aug. 16.

The sales figure excludes Sam’s Club, which posted an increase of 5%.

A widely followed measure of retailer performance, comparable store sales typically reflect locations open at least a year.

Wal-Mart is more exposed than many other retail chains to weakness in discretionary spending, said Natalie Berg, global research director for Planet Retail, a London-based consultant. That’s a “reflection of the wider market,” Berg said.

“Consumers are still feeling fragile. Confidence is down,” she said.

Berg said Wal-Mart is “on the right track,” especially with its grocery business, as the company moving forward with plans to open smaller stores in large cities as growth in its traditional Supercenters slows. She expects Wal-Mart to continue to build market share in groceries.

Wal-Mart controls at least a fifth of the U.S. retail food market, according to analyst estimates.

During the call, Simon said Wal-Mart’s grocery prices rose 3.5% in the quarter from a year earlier, though the company is absorbing much of that, rather than raising prices on shelves.

Food inflation replaced gasoline prices as the “most important household expense concern” for Wal-Mart customers, Simon said, citing recent customer surveys.

Despite continued softness in U.S. sales, Wal-Mart’s quarterly results still topped analyst expectations as international sales remained strong, and the company said comparable store sales may turn positive during the current quarter.

During the three months ending July 31, Wal-Mart’s fiscal 2012 second-quarter, net income rose to $3.8 billion, up 5.6% from $3.6 billion a year earlier. Total revenue rose 5.5% to $109.4 billion.

In the 12 months ending Jan. 31, groceries accounted for 54% of Wal-Mart’s U.S. sales, or nearly $141 billion, according to a recent company filing.

Based on industrywide averages, Wal-Mart’s U.S. fresh produce sales probably generate $14.5 billion to $15.5 billion a year, consultant Bruce Peterson estimated.

Peterson is president of Fayetteville, Ark.-based Peterson Insights and formerly was senior vice president and general merchandise manager of perishables at Wal-Mart.