(Reuters) - Wal-Mart Stores Inc (>> Wal-Mart Stores, Inc.) reported weaker quarterly earnings and lowered its annual forecast on Tuesday, as it copes with higher labor costs, a squeeze on pharmacy margins and sliding sales at its British supermarket chain.

Shares of the world's largest retailer fell 3 percent to $69.75 after trading at its lowest in 2-1/2 years.

The results showed how a move to lift wages and other costs have kept Wal-Mart from taking full advantage of a strengthening U.S. economy, although there was a bright spot in its report: a fourth straight quarter of same-store sales growth.

Net profit attributable to Wal-Mart fell to $3.48 billion, or $1.08 per share, in the second quarter ended July 31, from $3.92 billion, or $1.21, a year earlier. Analysts, on average, expected $1.12 per share, according to Thomson Reuters I/B/E/S.

Wal-Mart lowered its forecast for the year ending in January to a range of $4.40 to $4.70 from its outlook of $4.70 to $5.05 in February. The consensus was for $4.77 per share.

The significant cut to the forecast, even as Wal-Mart logged a 1.5 percent increase in comparable sales at U.S. stores open at least a year, highlighted a growing problem with controlling costs, said Edward Jones analyst Brian Yarbrough.

"It was a big drop," said Yarbrough, referring to its revised forecast, which included 24 cents a share to pay for higher wages, training and additional worker hours. "I question whether they will even be able to grow earnings next year."

In February Wal-Mart had flagged it would spend $1 billion on higher pay and for training, which will weigh on earnings this year. It also warned of higher spending to boost its e-commerce infrastructure as it seeks to close the online gap with Amazon.com Inc (>> Amazon.com, Inc.), which recently passed the Arkansas-based retailer in market value.

But on Tuesday Wal-Mart said costs to increase worker hours beyond the February plan, as it tries to improve customer service with faster checkouts and better-stocked shelves, were denting earnings more than anticipated.

It also said reduced reimbursement rates from pharmacy benefit managers were hurting margins in its U.S. pharmacy business and that wider healthcare insurance coverage generally had led to fewer higher-margin cash transactions on drugs.

Another problem is increasing "shrink," a retail industry term for losses tied to various issues including theft.

A stronger dollar took a toll on its international business, which suffered a 14 percent fall in operating income in the quarter. Same-store sales at Asda, the UK grocery arm, declined 4.7 percent, the worst quarterly performance in the 16 years it has been owned by Wal-Mart.

In one upbeat note, the 1.5 percent increase in same-store U.S. sales beat the consensus for a 1.0 percent rise, according to analysts polled by research firm Consensus Metrix. Sam's Club, its wholesale club store division that competes with Costco Wholesale Corp (>> Costco Wholesale Corporation), achieved same-store sales growth of 1.3 percent, excluding the impact of fuel.

Chief Financial Officer Charles Holley told an earnings conference call that while lower gasoline prices helped drive sales, the bulk of the gains were due to increased investments in its stores as well as in wages and training.

The retailer lowered its forecast for opening smaller-format stores, and now plans to open 160 to 170 Neighborhood Markets locations for the full year, down from 180 to 200. It said it was still on track to open 60 to 70 Supercenters this year.

(Reporting by Nathan Layne in Chicago; Editing by Lisa Von Ahn and Jeffrey Benkoe)

By Nathan Layne