Wal-Mart has reported its first decline in profit for a decade, with earnings hit by the sale of its German unit, high energy prices that put pressure on US sales and increased costs in the retailer's home market.

For the quarter ended 31 July, Wal-Mart posted net income of US$2.08bn, or 50 cents per share, down from $2.81bn, or 67 cents per share for the comparable period of last year.

The results include an $863m one-off charge for the sale of its German stores to Metro AG.

Wal-Mart exited Germany in July, having pulled out of South Korea in May, after raking up losses in each market. The company said that it withdrew to focus on more profitable overseas markets with greater potential for growth, such as China and South America.

With the exclusion of the company's German and South Korean operations, Wal-Mart's income from continuing operations was up 5% to $2.98bn, or 72 cents per share, from $2.85bn, or 68 cents per share, a year ago.

In the US, Wal-Mart CEO Lee Scott said that sales disappointed with customers making fewer store visits to conserve gas and adopting a more conservative approach to spending.

"In the United States, customers tell us they are most concerned about gas prices," Scott said in a prerecorded message. "This has been consistent every month this quarter."

Higher fuel and energy prices in the US also pushed up costs and dented margins, Scott continued. Wal-Mart's CFO Tom Schoewe elaborated that domestic profit margins were under pressure from various factors, such as higher transportation costs and increased sales of lower-margin products.

Sales at stores open a year or more increased by 1.5% in the US, considerably lower than comparable store sale gains reported for the same quarter of last year, which jumped by 3.6%, and lower-still than the first quarter increase of 3.8%.

Food sales grew faster than general merchandise, Schoewe observed, putting pressure on margins because groceries are less profitable than non-food items.

Despite a challenging quarter Wal-Mart concluded that results were in line with expectations and reiterated its full-year guidance.