A struggling ethanol producer with a plant in Minnesota and another in Nebraska said Tuesday it was blindsided by a deal signed by its lender to sell both facilities to a larger ethanol company.

Green Plains Renewable Energy, the nation's fourth-largest ethanol maker, has agreed to acquire the plants in Fairmont, Minn., and Wood River, Neb., from First National Bank of Omaha for $101 million. The agreement was announced by Green Plains in a morning news release.

Those plants had been owned by BioFuel Energy Corp., a Denver-based ethanol company that has been losing money and had defaulted on its senior debt with the bank, which asserted its lien rights on the plants. The Fairmont plant, one of Minnesota's largest, has been idle for a year.

"The first we heard of the definitive agreement was when we saw the news release this morning," said Mark Zoeller, BioFuel Energy Corp. vice president and general counsel, in an interview with the Star Tribune. "We were completely unaware that this was coming out."

Green Plains spokesman Jim Stark said the deal was struck after Carl Marks Advisory Group, a New York consulting and investment banking firm, approached the company on behalf of the bank. Stark said confidentiality was required because both Green Plains and BioFuel Energy Corp. are publicly traded companies governed by U.S. securities laws. The bank had no comment.

As a courtesy, Stark said, Green Plains attempted to contact BioFuel Energy executives early Tuesday before the news release, but didn't reach them.

Attorney George Singer, a partner in the Minneapolis law firm of Lindquist & Vennum who has handled bankruptcies and ethanol plant deals, said it is extremely rare for a lender to sell business assets without bothering to tell a company.

"I have never heard a borrower say, 'I didn't know the plant was sold,' '' said Singer, who was not involved in the deal.

Zoeller said BioFuel Energy earlier had made a "reasonably equivalent" offer to the bank to refinance the plants and retain ownership, but the offer had lapsed. Earlier this year, the company also had retained investment banker Piper Jaffray & Co. to look for possible buyers, but no deal surfaced.

"It seems the lender has gone in a different direction," Zoeller said. "This is entirely driven by the lender."

If the deal goes through, BioFuel Energy would have no physical assets for its executives to manage, and it is unclear what would happen to the company. It has close ties to Minnetonka-based Cargill Inc., which owns grain terminals at both ethanol plants and supplies corn and markets the ethanol. Cargill also holds a 4 percent stake in the company, according to Bloomberg data.

Zoeller said BioFuel Energy has about $10 million in cash that isn't affected by the deal. He said the company is considering its options and, when asked, didn't rule out litigation.

BioFuel Energy Corp. shares dropped 18 percent, closing at $2.66 Tuesday. Meanwhile, Green Plains stock was up nearly 6 percent to $15.72.

Green Plains said that if the deal goes through, it intends to reopen the Fairmont plant by the end of this year. Stark said the company will talk to furloughed workers about rehiring them, but made no promises.

The two new plants give Green Plains 12 ethanol refineries, including one in Fergus Falls, Minn., that it acquired in 2011. Both new plants will be among its largest, with nameplate capacities of 115 million gallons per year. Green Plains said their production would increase the company's overall ethanol output by 28 percent and boost earnings in 2014.

"Our growth strategy remains focused on right location, right technology at the right price for ethanol production assets and this acquisition meets all three criteria," Green Plains CEO Todd Becker said in a statement.

David Shaffer • 612-673-7090 Twitter: @ShafferStrib