A federal judge on Friday ordered the Great Northern Paper Co. bankruptcy case transferred from a court in Delaware, where the parent company is located, to a bankruptcy court in Maine, where more than half of the company’s creditors are located.

Judge Mary Walrath made the ruling in U.S. Bankruptcy Court for the District of Delaware, despite the threat of two of Great Northern’s biggest lenders to foreclose on the company’s closed East Millinocket paper mill property if the case were transferred.

The lenders, Louisiana-based Stonehenge Community Development LXI LLC and Enhanced Capital New Market Development Fund X LLC, are owed $40 million in secured debt.

Great Northern parent company GNP Maine Holdings LLC filed for Chapter 7 bankruptcy on Sept. 22, and owes more than $50 million to more than 1,000 creditors. Within a week after the bankruptcy filing in Delaware, several Maine creditors petitioned the court to transfer the case to Maine.

Chapter 7 bankruptcies often end in liquidation – the selling off of assets resulting in a permanent shutdown.

A motion filed in late September by creditors Hartt Transportation Systems Inc., Lynch Logistics Inc. and Lynco Inc., indicated that several other parties, including the former workers’ union representatives and the Maine Office of the Attorney General, support the proposed change of venue. The towns of Millinocket and East Millinocket also supported the change.

“They had have no connection to Delaware. They were dealing with a paper mill in East Millinocket,” argued attorney Jeremy Fischer, who represents the three companies for the Portland law firm Drummond Woodsum. He went to Delaware for the hearing.

“I’m extremely troubled by the threat from the secured lender that they would in effect pull the plug on this case if they don’t get their way on venue,” Fischer said. “I hope their threat is idle, but if not I’m confident that the state of Maine will step up.”

The bankrupt company, which is managed by the New Hampshire-based private equity firm Cate Street Capital, shut down its East Millinocket mill in late January and laid off more than 200 workers a few weeks later, citing rising costs for energy and wood. The mill had produced newsprint and paper for the book publishing industry for more than 100 years.

Walrath made her ruling after hearing arguments from both sides. Some lawyers appeared in the Delaware court in person, while others joined the hearing by phone.

“Fifty percent of the creditors are from Maine,” Walrath said in her decision after the hour-long hearing. “The fact that 50 percent are not, does not weight in favor of Delaware because they are all over the country.”

The judge’s ruling also may upend plans by a lawyer assigned as a bankruptcy trustee to the case in Delaware to quickly shop the shuttered paper mill to prospective buyers who could reopen the plant.

The Delaware trustee, Charles A. Stanziale Jr., told the judge at the hearing that although he has been trustee for fewer than 10 days, he had already lined up potential buyers to look at the paper mill next week.

Stanziale said he also obtained an agreement with the lenders to continue funding the company for at least three months while in bankruptcy to provide around-the-clock security at the paper mill, keep it heated during the coming winter months, continue operating its wastewater treatment plant and keep up with inspection requirements.

The company also paid all the former mill employees their final paychecks on Thursday, Stanziale said.

Stanziale said he will work with whomever the bankruptcy court in Maine assigns as his replacement as bankruptcy trustee. He said he had hoped either to sell the company to an “end user” who could reopen the plant and rehire the employees, to sell it to a liquidator or, in worst case, sell it at auction.

A lawyer for the towns of Millinocket and East Millinocket said at the hearing that the two towns are owed more than $3 million in back taxes.