Investor Carl Icahn has agreed to lend Trump Entertainment Resorts Inc. up to $5 million to help the owner of Trump Taj Mahal Casino in Atlantic City pay its bankruptcy expenses into January.

The move, described in a bankruptcy court filing Wednesday, could indicate that a deal is near to keep the Taj Mahal open.

Trump has said it will close the casino Dec. 12 if its biggest union doesn't drop an appeal of an October bankruptcy ruling that stripped workers of company-sponsored health insurance.

Icahn, who will take complete control of Trump Entertainment if the current bankruptcy plan is approved, appeared to give ground last week.

The company said it would restore health benefits for at least two years and contribute to a new employee retirement plan, but only if the appeal were dropped.

In an open letter Tuesday to Bob McDevitt, president of Unite Here Local 54, Icahn urged McDevitt to accept the offer and save 3,000 jobs.

"There is no time left to negotiate, and that is why the company and I have put everything on the table," Icahn's letter said.

The union has declined to comment this week, but McDevitt expressed optimism on a radio show last week. "I think Taj Mahal will stay open," he said in a discussion with Philadelphia labor leaders.

As part of its plan to reorganize its finances, Trump Entertainment is seeking $175 million in state and local government aid over five years, including $55 million as it exited bankruptcy.

Government officials, especially Atlantic City Mayor Don Guardian, turned a cold shoulder on those proposals when they were announced, but the company said less than a week ago that it had "made significant progress with representatives of state and local governments on a package of tax relief and other incentives."

Until now, Trump, which filed for bankruptcy protection in September, has been using cash on hand to pay its day-to-day operating expenses and the bills related to its bankruptcy. Trump Plaza closed on Sept. 16.

The company said previously that it expected to run out of cash next month, but now that doomsday has been pushed back to Jan. 16, a filing Wednesday said.

Trump already owes Icahn $292.5 million, including $6 million in unpaid interest. That debt gives Icahn a first lien on virtually all Trump Entertainment property.

That meant that Icahn and his affiliates "are the only source of viable post-petition financing" that would help the company get through bankruptcy, William H. Hardie III, a managing director in the New York office of Houlihan Lokey, Trump's financial advisor., said Wednesday in a court filing.