Relativity Media’s efforts to secure a $45 million loan to allow it to continue operating while it goes through the bankruptcy process hit a snag on Friday.

Instead, the studio will have to settle for a smaller $9.5 million cash infusion that it hopes can allow it to keep the lights on until a hearing on August 14. At that point a bankruptcy court judge will decide whether to grant the company access to the full amount of funding it seeks.

In the interim, the company will be allowed to use $4 million of the bridge funding on so-called critical vendors related to ongoing television and film production.

It could have been worse. It initially appeared as though negotiations on the financing had reached an impasse after Judge Michael Wiles rejected the initial proposal for a debtor-in-possession (D.I.P.) loan, arguing that the auction process it required as part of its agreement to provide financing was too aggressive. The accelerated timetable favored a handful of creditors at the expense of the nearly 150 lenders and stakeholders hoping to get paid, he said.

As part of the loan agreement, attorneys for Relativity asked that a sale of the company take place by October 2, and they prevailed upon the court to shorten the amount of time that a creditors committee could challenge the liens on its assets from a standard 60 days to 30.

“I do not intend to dawdle … but I need flexibility to do what I think must be done,” Wiles told attorneys. “I will not tie my hands with deadlines.”

Richard Wynne, an attorney for Relativity, started the hearing in New York Bankruptcy Court on Friday by describing the Chapter 11 process as a “plain vanilla” bankruptcy, but the loan agreement itself revealed a tangle of competing interests that seemed to belie that claim. The companies that are offering the bridge funding are also interested in possibly acquiring the company in the auction process, Wiles noted.

The judge seemed to balk at the number of restrictions in the financing agreement, all intended to ensure that a sale take place as quickly as possible. He stressed that he would not “with a stroke of the pen” lock himself into supporting a process that might depress the price that Relativity sells for, limiting its ability to make all of its creditors whole.

The judge also insisted that the D.I.P. agreement remove a clause that granted the creditors a 5% “exit fee” if they are not successful in their bid to buy the company at auction.

“That skews the bidding process,” Wiles said.

After failing to come up with payments on a massive $320 million debt bill, Relativity filed for bankruptcy protection Thursday. In filings, it estimated $500 million to $1 billion in liabilities, while claiming assets of between $100 million and $500 million.

Four of Relativity’s creditors — Anchorage Capital Group, Colbeck Capital, Falcon Investment Advisors and Luxor Capital Group — are planning a stalking horse bid, with the hopes of setting a minimum sales price, according to an individual with knowledge.

In his introductory remarks, Wynne depicted Relativity as an Oscar-winning studio behind 200 films and reality TV shows that was undone by its debt obligations. “This is a very good company, an important company in an important industry … that was burdened by a complex capital structure,” he said.

Relativity said that many of its expected expenses are tied to television advertising for upcoming films such as “Masterminds,” a comedy starring Kristen Wiig and Zach Galifianakis that’s set to open in October.

In a statement, Relativity described the court’s ruling as a “milestone” in its reorganization.

“The ability to minimize the impact of this process on our employees and operations is among our most important priorities, and we are pleased that the court has granted these motions, which will allow us to preserve value for our stakeholders,” said Relativity chairman and CEO Ryan Kavanaugh. “I look forward to building on this momentum to emerge as a stronger company.”

Sunlight streamed in through half-drawn blinds in the Manhattan courtroom, as attorneys for Relativity’s many creditors packed onto wooden benches. The number of interested parties meant that the objection process was often spirited. Peter Gilhuly, an attorney for RKA Film Financing, suggested that Relativity’s leadership had engaged in fraud by using money earmarked to promote and advertise its films for other purposes. RKA is suing Relativity CEO Kavanaugh for misappropriating funds.

Daniel Shamah, an attorney for Macquarie Securities, alluded to this ongoing litigation and the fraud allegations, noting that the accusations are “grave.”

Wiles said he had not been advocating for an open-ended auction process, noting that he was willing to entertain a provision in the D.I.P. agreement that would have pushed a sale back to mid-November. However, attorneys for the lenders said the scope of Relativity’s expenses meant that it would run out of cash if the sale deadline was extended.

“The maturity is not tied to a mystical, theoretical date … the money runs out,” an attorney for the lenders explained.