* Ethanol output falls 26,000 bpd to 857,000 bpd * Stocks fall 464,000 to 20.29 mln bbls By Michael Hirtzer July 5 (Reuters) - U.S. ethanol production dropped to its lowest level in 10 months last week as dwindling pre-harvest corn stocks crushed profit margins, while a deepening drought in the Midwest threatens to extend the pain into next year. Following the temporary closure of three U.S. ethanol plants in recent weeks, production plunged 3 percent, or 26,000 barrels per day, to 857,000 bpd in the week ending June 29, the Energy Information Administration said. It was the lowest output and the sharpest decline in production since September. Stocks of the fuel fell 464,000 barrels to 20.29 million barrels. "We have negative margins and plants don't typically like heat. Both of those combined to KO (knock out) the production number," said Jerrod Kitt, analyst at the Linn Group in Chicago. The ethanol industry is bracing for its worst spell since the bankruptcy-ridden days of 2007 and 2008. Kitt said profit margins at ethanol plants ranged from 40 to 60 cents per gallon of ethanol produced. That is about 20 cents below what the plants need to make to be profitable. The squeeze initially came on two fronts: Gasoline prices tumbled this spring as global economic woes counter cuts to Iran's oil exports. And corn basis bids, or the amount above or below benchmark Chicago Board of Trade futures users bid to buy the grain in a specific location, have spiked as stockpiles dwindle to their lowest since 2004. On Thursday, basis bids were at record highs at a closely watched ethanol and sweetener maker in Decatur, Illinois, pushing the cash corn price above $7.75 -- just below the all-time high futures price of nearly $8 set last year. In the past two weeks a third factor has pushed some operations into the red: corn futures have surged by a third since early June as record-high heat and the most severe drought conditions in 24 years stress the developing crop. DOWN THE LINE Some ethanol producers are shutting their plants in order to avoid paying premium prices for the dwindling 2011 corn crop, hoping to ride out the bad times. Output often typically ebbs in late summer, just before the harvest replenishes supplies. Now they face the dispiriting prospect that this autumn's harvest may fail to sufficiently replenish inventories that are near critically low levels. The reductions in output have so far been too small to compensate for the drought damage. "It's safe to say we're losing corn supply right now faster than demand," said R.J. O'Brien analyst Rich Feltes. Valero Energy Corp in June announced that it was idling two plants, in Indiana and Nebraska, with a total capacity of 210 million gallons per year. Another plant in Iowa last week came back online after being shut down for maintenance, said company spokesman Bill Day. Nedak Ethanol LLC also temporarily shut down its 44 million-gallon-per-year ethanol plant in Atkinson, Nebraska.