Safeway Inc. reported disappointing quarterly sales growth and trimmed its sales outlook for the year, as the second-largest U.S. supermarket chain struggled to pass through higher food costs to its shelves.

Identical-store sales rose 0.5% in the second quarter, excluding fuel, compared with the same period in 2010, Safeway said in a July 21 statement announcing financial results: That was Safeway’s second-straight quarterly gain, after sales fell versus year-earlier levels for eight consecutive quarters.

But Safeway’s sales fell short of analysts’ expectations for an increase of about 0.7%, sending the company’s shares down over 9% July 21. Safeway’s margins were pressured by rising costs for meat, milk and other foods, and like other major grocery chains, competition from Wal-Mart and other discounters has made it difficult to raise prices.

Safeway’s sales were “perplexingly weak” in light of rising inflation, BMO Capital Markets analyst Karen Short said in a report. The company’s eroding market share appears to have accelerated, Short said, indicating that the Safeway customer “is potentially more fickle than we thought.”

A combination of rising food and fuel inflation is dampening consumer demand, especially among lower-income people, Short said.

“As a result, these customers are less loyal to Safeway and are shopping at multiple stores in search of the lowest prices,” Short said.

In the statement, Safeway said expects its identical-store sales in 2011 to rise 1%, excluding fuel. That’s weaker than a projection Safeway made in April for a 1% to 1.5% increase. Identical- or comparable-store sales are a key indicator of retailer performance and typically reflect locations open at least a year.

By comparison, Kroger Co., the largest U.S. supermarket chain, in June said identical-store sales during its most-recent quarter rose 4.6%, excluding fuel, compared with a year earlier. Kroger expects identical-store sales to rise 3.5% to 4.5% this year.

Steve Burd, Safeway’s chief executive officer, said second-quarter results exceeded the company’s expectations, with the improvement in identical-store sales carrying into the third quarter.

“We remain focused on building customer loyalty and expect sales to continue to gradually improve through the second half of the year,” Burd said in the statement.

Safeway posted net income of $145.8 million during the quarter ended June 18, up 3.2% from the same period in 2010. Total revenue rose 7.1% to $10.2 billion.

Pleasanton, Calif.-based Safeway is the second-largest U.S.-based supermarket chain based on sales behind Kroger Co., though Wal-Mart sells more food than both combined. Last year, Wal-Mart’s U.S. grocery business generated sales of about $140.6 billion.

In afternoon trading July 22 Safeway shares fell 59 cents, or 2.8%, to $20.88. The stock is down 7.2% this year.