– Farmer Dwayne Ehlert remembers the moment last August when he delivered a truckload of corn to an ethanol plant here and sold it for a record $8.16 a bushel.

“I knew it was good for me, and I knew it wasn’t good for ­anyone else,” said Ehlert, 70, who has been farming for five decades on the outskirts of this southern Minnesota city.

High prices for corn, from which ethanol is made, have ­hammered the ethanol industry. A month after Ehlert made his profitable delivery, the Fairmont plant halted production, one of 20 U.S. ethanol producers to do so over the last year.

In Minnesota, the nation’s fifth-largest ethanol-producing state with 21 plants, three ethanol facilities went idle. Minnesota corn farmers like Ehlert, whose crops survived the drought that wrecked other states’ harvests, kept ­hauling corn to ethanol plants and fetching some of the highest prices ever.

For the first time in 16 years, U.S. ethanol production declined in 2012, in tandem with a drop in gasoline demand thanks partly to more fuel-efficient vehicles. Ethanol makers got caught between the high cost of corn and ethanol prices that sometimes sank too low.

“No matter who you were, you were working hard to get through the year,” said Greg Ridderbusch, president of Blue Flint Ethanol, an Underwood, N.D., ethanol plant owned by Great River Energy, the wholesale power cooperative based in Maple Grove.

As Minnesota corn farmers prepare to plant a record-size crop this season, the outlook for the ethanol industry could turn on the next corn harvest — and whether it brings lower prices.

“All they want to do is get to a new crop,” said John Christianson, principal in a Willmar, Minn., accounting firm that tracks ethanol plants.

Already, the ethanol industry is experiencing a modest recovery this spring, as corn prices have remained below $7 per bushel since March. Eight idled production facilities have reopened, including one in Little Falls, Minn. Ethanol output has risen, though it remains below the levels of recent years.

“Everyone is optimistic because the price of corn has gone down,” said Larry Johnson, an ethanol industry consultant based in Cologne, Minn.

Omaha-based Green Plains Renewable Energy, the nation’s fourth-largest ethanol producer with nine plants including one in Fergus Falls, Minn., reported first-quarter profits of $2.6 million on May 1 and expects earnings to improve in the months ahead.

Yet the Fair­mont plant, which once employed 66 people, recently shed all but 16, possibly until the fall. The owner, Biofuel Energy, based in Denver, lost $46 million last year, and has retained the Minneapolis investment bank Piper Jaffray & Co. to consider its options, including a possible sale. Company officials declined to comment.

Tough times at some plants

Ethanol producers got caught last year in a commodities squeeze. They paid a lot for corn and didn’t get enough for ethanol. The industry also lost a cushion when a tax credit to blenders of corn ethanol expired Dec. 31, 2011.

Five Minnesota-affiliated ethanol companies that publicly report net income suffered losses last year, while two others eked out slight gains. Blue Flint, which discloses partial financial information, reported a small operating loss.

In Buffalo Lake, Minn., an ethanol plant acquired and reopened last year by Purified Renewable Energy has been idle since March. The company is trying to reorganize under Chapter 11 of the bankruptcy code, but faces $26 million in liabilities.

Bloomington-based Advanced BioEnergy, which lost $26 million in 2012, sold its Nebraska ethanol plant in December to Flint Hills Resources, a unit of Koch Industries that has become the nation’s fifth-largest ethanol producer. Advanced BioEnergy still has two South Dakota plants.

The top 25 percent of ethanol plants that are most efficient continued to make money, though not a lot, said Christianson of the analytics service Biofuels Benchmarking. Many Minnesota plants fared better than plants in the worst-hit drought states because they could buy corn at substantially lower average cost, he said.

To break even, plants increasingly rely on sales of byproducts like distillers’ grains, an animal feed that cattle ranchers purchase instead of corn. Yet as corn prices drop, so can those revenues, said Paula Emberland, an analyst for the benchmarking service.

Brian Kletscher, CEO of Highwater Ethanol, whose plant in Lamberton, Minn., opened four years ago, said the industry has seen corn prices skyrocket in the past. The worst is when corn is up and ethanol is down.

“That combination is not good,” said Kletscher, whose plant has lost money in the past four quarters.

Kletscher, who also is president of the Minnesota Biofuels Association, said one concern about restarting idle ethanol plants is that their extra output will hurt prices and extinguish profit margins. Despite that risk, he said, “I feel much more positive going forward.”

Ehlert, who grows corn and soybeans outside of Fairmont, also is upbeat, even as he waited for his fields to dry after recent spring storms. He said his 900 acres of corn can be planted in a week.

Meanwhile, he still has some of last year’s corn in storage — along with a place to sell it. Just five miles away from the idle Fairmont plant sits Minnesota’s largest ethanol producer, Valero Renewable Fuels of Welcome.

“They’re still buying corn,” Ehlert said.

The ‘blend wall’

Even if this fall’s harvest brings relief from high corn prices, the ethanol industry faces a long-term problem with demand for its fuel.

U.S. ethanol producers already have the capacity to supply roughly 10 percent of the nation’s motor-fuel needs. Unless drivers use more fuel — and the trend is the opposite — the industry has little room to grow domestically. Industry officials call it the “blend wall.”

One solution is to sell ethanol blends greater than 10 percent at the pump. The ethanol industry has been pushing 15 percent, or E15, blends for most U.S. vehicles. While the idea has won federal approval, it has gained only modest traction in the marketplace. The oil industry opposes the shift and wants Congress to keep gas at E10.

Minnesota is the testing grounds for another strategy. Gevo Inc., which owns an ethanol plant in Luverne, is fine-tuning a process to ferment a higher-value alcohol called isobutanol and initially sell it to chemical companies for bioplastics and other products. Gevo has been beset by start-up problems, patent disputes, losses and a low share price, but at least six securities analysts rate it as a stock to buy.

Optimism about yet another approach persists at Great River Energy, which is seeking investors to build a second ethanol plant in North Dakota. The new plant would operate like its first one, Blue Flint, tapping steam from an adjacent coal-fired power plant in Spiritwood, N.D. The essentially free heat avoids the need to purchase natural gas.

“It is a low-cost operating model,” said Ridderbusch, who also is a vice president at Great River Energy. “It is a financial model that weathers tough markets.”