(Reuters) - The world's largest consumer goods maker Procter & Gamble Co (>> Procter & Gamble Company) narrowly beat quarterly earnings expectations on Thursday, saying shrinking retailer inventories and higher commodities and transportation costs squeezed margins.

Shares in P&G were down 2.4 percent in premarket trading, with lackluster third-quarter earnings and forecast dampening gains from P&G's earlier announcement that it was buying Merck KGaA consumer health business for about 3.4 billion euros ($4.2 billion). The deal will give P&G vitamin brands such as Seven Seas and greater exposure to Latin American and Asian markets.

The maker of Pampers diapers and Gillette razors said it expects full-year organic sales growth at the low end of its 2 to 3 percent range. Overall, P&G said it expects sales to rise about 3 percent, including acquisitions and divestitures.

U.S. packaged goods companies, already struggling with lower demand and price tensions with retailers, have recently begun flagging higher commodities and transportation costs. Railroads and truck fleets have raised prices amid a shortage of drivers, reduced capacity, higher fuel prices and a strengthening U.S. economy.

Sales are under pressure from lower prices, tightening inventories and growing private label brands at retailers including Walmart Inc (>> Wal-Mart Stores) and Target Corp (>> Target Corporation), Chief Financial Officer Jon Moeller said on a call with journalists.

P&G operates in several politically volatile markets where consumption is down, including Egypt, Brazil and Nigeria, Moeller added.

Reported gross margin decreased by 100 basis points in the third quarter ended March 31. Net income attributable to the company fell to $2.51 billion, or 95 cents per share, compared with $2.52 billion, or 93 cents per share, a year earlier.

"Expectations were coming down entering the quarter, but organic sales growth was likely still below what investors were looking for," Wells Fargo analyst Bonnie Herzog said.

Pricing is becoming an even bigger concern and fourth-quarter organic sales will need to accelerate to hit lowered full-year guidance, Herzog added.

Excluding items, the company earned $1 per share, beating analysts' average estimate by 2 cents, according to Thomson Reuters I/B/E/S.

Net sales rose 4.3 percent to $16.28 billion, helped by demand for skincare products Olay and SK-II, as well as fabric and home care products such as Febreze. Analysts had expected sales of $16.21 billion.

P&G also said on Thursday that it was ending its PGT Healthcare joint venture with Teva Pharmaceutical Industries , saying its priorities and strategies were no longer aligned with Teva's.

(Reporting by Vibhuti Sharma in Bengaluru; Editing by Supriya Kurane and Nick Zieminski)

By Richa Naidu and Vibhuti Sharma