They are lured by projections of 10 percent annual growth for the sector and by Chinese consumers' willingness to pay a premium for foreign brands as they remain wary of local brands' safety records.

Just last week, China's top-selling dairy firm Inner Mongolia Yili Industrial Group Co (>> Inner Mongolia Yili Industrial Group Co.) recalled six months' worth of one brand of infant formula after government tests found it was tainted with mercury, a heavy metal that can cause neural damage if ingested.

The news has sent Yili's stock sliding 13 percent over the last two days to trade at 21 yuan a share.

The latest foreign bet comes from Danish-Swedish dairy group Arla , which said on Friday it would buy what amounts to a 6 percent stake in Yili's main competitor, China Mengniu Dairy Co (>> China Mengniu Dairy), from private equity fund Hopu for 1.7 billion Danish crowns ($289 million). The deal lifted Mengniu shares by 7 percent on Monday.

"If you have an international brand, then there's a premium in the market, because food safety is a concern," said Kevin Bellamy, dairy analyst at Rabobank in the Netherlands.

For some global milk producers, finding new markets is also crucial as they consolidate and expand production faster than their traditional, and mature, milk markets can grow.

Milk and formula safety became a deep concern for Chinese parents after a 2008 scandal in which at least six babies died and 300,000 were sickened from drinking milk formula contaminated with melamine, a chemical used in fertilizer and plastic.

But investing in China can mean reputational risk for international dairy firms. In 2008 Arla, which already has a formula joint venture with Mengniu, had to reassure its international customers that it did not sell Chinese-produced products elsewhere, after production at the Chinese plant was temporarily suspended due to the melamine scandal.

In addition, Mengniu last year destroyed milk tainted with aflatoxin, a carcinogenic mould found in corn grown in humid climates.

"To be a minority shareholder in a food company in China, regardless of the quality of your partner, you're still exposed to the supply chain," said dairy consultant David Mahon, head of Mahon China Investment Management, referring to the Arla/Mengnui deal.

"The lesson from melamine would not have been learned, and that would be a pity."

PRIVATE EQUITY

China is the world's largest formula market and is expected to overtake the United States as the largest dairy market by 2020.

Private equity firms Hopu, KKR & Co L.P. (>> KKR & Co. L.P.) and Carlyle Group all took stakes in China dairy companies between 2008 and 2009.

Hopu is winding down its fund, and exited as the lockup on its investment expired, but KKR and Carlyle have invested in technology and production systems to bring Western style milk production to China dairy firms, including importing cows.

Private equity funds typically exit their investments after three to five years, and Carlyle and KKR will hope to attract Western strategic buyers for their respective stakes.

KKR has 24 percent of China Modern Dairy (>> China Modern Dairy) valued at about $266 million, while Carlyle has 24 percent of Yashili (>> Yashili Intl) worth around $130 million. China Modern Dairy provides milk for the Shanghai market while Yashili supplies the wealthy Pearl River Delta.

Among more recent private equity investments in the sector, Olympus Capital led a consortium to buy a significant minority stake in Huaxia Dairy Farm Ltd in mid-2011 for $45 million, providing expansion capital and bringing in a European strategic investor, Mueller Milch, for one of China's largest single dairy farms.

SUPPLY CHAINS

To keep up with growth, multinational dairy firms are looking to expand their production in China, but are taking pains to guard against quality problems, particularly the need to control the supply chain for raw milk.

Nestle's (>> Nestle SA) sales in China are about to expand significantly, pending approval by the commerce ministry to incorporate the China operations of Pfizer Inc (>> Pfizer Inc.), which would boost its market share in infant formula to 12 percent. The Swiss food giant agreed in April to buy Pfizer's infant formula division for $11.9 billion.

Greater China accounted for only 3 percent of Nestle's global sales in 2011, but sales in the region grew by 23 percent last year.

Nestle buys milk directly from thousands of small dairy farmers in the flat green fields of northeast China. But it has already cut its small suppliers from nearly 30,000 to under 12,000, and plans to rehouse the rest in big dairy bases.

This month it broke ground on a $377 million project with U.S. dairy and feed cooperative Land O'Lakes and other partners. It will house a training center and two huge modern dairy farms, one with 2,400 cows, the other with 8,000.

"The farmers are moving into the cities, the system is getting consolidated, so we are moving towards more middle-to large-sized farms," Nestle's China chief executive Roland Decorvet told Reuters at the ground-breaking in Shuangcheng, near the northeastern city of Harbin.

New Zealand dairy cooperative Fonterra , which sells $2 billion a year of imported milk products in China, is also building large dairy bases near Beijing, the milk from which it sells at a premium to other dairies.

In 2008, Fonterra lost almost all its $150 million investment in Sanlu Group, the state-owned Chinese dairy at the heart of the melamine scandal.

COMING FLOOD

Another driving force for foreign firms to ramp up their presence in China is a coming surplus of milk in Europe.

The expiration in 2015 of national production caps in the European Union is expected to lead to a 6 percent jump in European milk production, bringing an additional 9 billion liters a year onto the market, said Bellamy of Rabobank.

"They could supply more to European cheese, but that's pretty saturated. The Asian and Chinese markets are very attractive because of the percentage of growth we are seeing," he said.

With its latest investment, Arla estimates its turnover in China will grow five-fold by 2016, from $119 million in 2011.

"It will contribute positively to our cooperative owners' milk price from day one, as we are able to add more value to milk that we otherwise would have to sell on the global bulk trading market, where the profit is lower historically," Arla Foods CEO Peder Tuborgh said in a statement. ($1 = 6.3651 Chinese yuan) ($1 = 5.8865 Danish crowns)

(Additional reporting by Stephen Aldred in Hong Kong; Editing by Jason Subler, Ron Popeski and Edwina Gibbs)

By Lucy Hornby and Jane Lanhee Lee