HOLTVILLE, Calif. -- The machine harvester cut across Ronnie Leimgruber's alfalfa field, blades whirring, leaving behind a thick trail of leafy legume ready to be dried and baled.

"You've got to drive like hell, drive fast and get as much as you can," said Leimgruber, a burly third-generation farmer in this Imperial Valley outpost.

Every stalk counts. Demand has never been greater for Leimgruber's crop. Prices for alfalfa hay have doubled in recent years to near-record highs.

"The last four years have been the best ever," said Leimgruber, 53. "I've made millions when in years past I've lost millions."

His good fortune traces across the Pacific to China's booming dairy industry.

Faced with dwindling access to water and arable land, China has little choice but to turn to U.S. farmers to help supply feed for the country's growing herd of dairy cows. Packed with fiber and protein, alfalfa hay is considered the gold standard for forage, and the western United States is the crop's Cote d'Or.

Since 2009, alfalfa exports to China grew nearly eightfold to a record 575,000 tons -- shipped overseas in the same containers that deliver the latest iPhones and flat-screen TVs from Chinese factories.

China has now pushed past Japan as Asia's biggest buyer of U.S. alfalfa and is second only to United Arab Emirates as the globe's top importer, according to data from the U.S. Department of Agriculture. Sales of alfalfa shipped abroad amounted to $586 million last year, part of the nation's record $144 billion in agricultural exports.

The thriving trade had largely gone unnoticed, not unlike more established export oddities to China such as scrap paper and chicken feet. But when three years of drought upended farms in the West, alfalfa became one of the most sought-after commodities in the bovine business.

Cattle ranchers with withered pastures were now in the market for the pricey forage, alongside dairy farmers. At the same time, production has been steadily declining in California, replaced by more profitable crops such as almonds and wine grapes. The Golden State produced 6 million tons of alfalfa hay last year, down from a high of 8 million in 2002, according to the USDA. With so much demand and diminished supplies, alfalfa prices have doubled in the past three years to more than $300 a ton.

Although good news for alfalfa growers, the higher prices are carving into the profit margins of dairy farmers, who found it even harder to feed their herds.

"It's all global now. We're competing with the rest of world for feed," said Cornell Kasbergen, a Tulare, Calif., dairy producer who considered feeding his cows soybean and canola but discovered that export demand made them just as pricey.

Experts say the alfalfa trade boom underscores the growing opportunity to cash in on changing dietary habits of burgeoning middle-class economies like China.

"The U.S. is sitting on one of the biggest chunks of tillable land in the world. It's in an ideal position to take advantage of growing global food demand," said Daniel Pearson, a trade policy expert at the Cato Institute who helped negotiate China's ascension to the World Trade Organization.

Agricultural exports to China soared to $25.8 billion last year from $5 billion a decade earlier. China is the biggest buyer of U.S. soybeans, which is used to feed livestock and make cooking oil. U.S. dairy exports to China -- fueled in part by U.S. alfalfa -- grew to $706 million last year, up from $137 million in 2009, according to the U.S. Dairy Export Council in Virginia.

Exporters are learning something alfalfa shippers have known for years: It costs little to freight goods on the back haul to China. That's because the U.S. runs a persistently high trade deficit with China that hit a record $318 billion last year. Containers from Asia arrive full but often return empty.

"It is cheaper to ship a load of alfalfa from the Imperial Valley to China than it is to ship the same load to Tulare County," said Michael Marsh, president of the Western United Dairymen, which represents 60 percent of California's dairy producers.

The increased international demand is dramatically boosting business for California alfalfa farmers, whose revenue is on the rise.

ACX of Bakersfield a leading hay exporter, got its start in the late 1970s exporting cubed hay to Japan. The company found growing demand in South Korea and Taiwan before expanding to the Middle East. Its sales brochure features pictures of cows, horses, sheep, a goat and a camel -- lest you forget which ruminants munch on their hay.

There's little confusion where the industry is turning. In 2011, China represented only about 2 percent of the company's revenue. Last year, it had grown to about 21 percent. China had ramped up its dairy production but still couldn't meet its alfalfa needs because of limits on arable land.

"China doesn't want to be 100 percent reliant on imported feed, but they have to right now," said Nicholas Gombos, vice president of supply chain and logistics at ACX.