Sales of the feed, known as distillers' dried grains, or DDGs, were one of the bright spots for ethanol makers such as Green Plains Inc, Valero Energy Corp and Pacific Ethanol Inc after China all but stopped buying corn ethanol, contributing to oversupply.

But now cuts to ethanol production are tightening supplies of DDGs and raising prices paid by livestock farmers. Many are turning to other feeds including soybean meal, the price of which eased as China halted imports of American soybeans.

While soymeal is more expensive than DDGs, it is also more nutritious for livestock and therefore more cost-effective at current prices.

The shift away from DDGs is another blow to a struggling biofuel sector. Robust demand for DDGs had been a buffer as the lowest ethanol prices in over a decade dragged on the industry.

The Maschhoffs, the largest U.S. family-owned pork producer, roughly halved DDG use from the autumn to December due to routine cost assessments, nutrition director Omarh Mendoza said. DDGs formerly accounted for up to 30 percent of hogs' rations, he said, but the Carlyle, Illinois-based company now is using more corn and soymeal instead.

"A lot of ethanol is not being produced and therefore there's not a whole lot of product out there," Mendoza said about DDGs.

Ethanol makers slashed production rates last year due in part to negative profit margins, according to the companies and traders.

Green Plains, the fourth largest U.S. producer, also put several plants up for sale, complaining of burdensome biofuel supplies. The cuts in output pushed up prices of DDGs and prompted switching to soymeal, company spokesman Jim Stark said.

Still, more reductions in ethanol output were necessary as supplies continued to outpace demand, Stark added.

U.S. ethanol inventories this month climbed to a near-record of over 23 million barrels even as output slowed to the lowest in over six months, Energy Information Administration data showed.

Prices for DDGs in the eastern half of Iowa, the top ethanol producing state, surged to $180 per ton in December, the highest in 3-1/2 years, according to Refinitiv Eikon data. Meanwhile, soymeal prices in Cedar Rapids, Iowa, were more stable, averaging $283 per ton last month.

Soymeal has more protein than DDGs, making it more expensive. However, in Cedar Rapids, soymeal's premium to DDGs reached just $103 per ton in mid-December, the smallest since 2012, the data showed.

The shift from DDGs is largely in the hog sector, a DDGs trader working for a publicly traded company said. Cattle generally are not fed as much soymeal and need fibre from DDGs, he said.

Hog producers are cutting the percentage of DDGs in their rations to as little as 10 percent from 30 percent due to high prices, said swine nutritionist John Goihl, who owns 3-D Nutrition Services in Shakopee, Minnesota.

Farmers are reluctant to abandon DDGs completely because they provide energy, amino acids and phosphorus important for healthy animals, he said, meaning that producers absorb some of the price increase.

"They'll stay at the lower levels unless this DDG price relationship really gets out of hand," Goihl said.

China, formerly the top importer of both DDGs and ethanol, last year stopped buying U.S. products due to the trade war.

Thailand recently halted imports of U.S. DDGs, too, over concerns about beetles found in two shipments. U.S. exports of DDGs have remained robust elsewhere in Asia and in Mexico.

"DDGs had really helped keep the ethanol industry going when ethanol prices were low, and supplement margins," said Arlan Suderman, chief commodities economist for U.S. broker INTL FCStone.

(Reporting by Tom Polansek and Michael Hirtzer; Editing by David Gregorio)

By Tom Polansek and Michael Hirtzer