A U.S. Bankruptcy Court judge has signaled he will approve Relativity Media's plan to exit bankruptcy, but not before Ryan Kavanaugh’s embattled studio meets certain conditions to demonstrate that it can continue its business.

The conditional confirmation by Judge Michael Wiles marks an important milestone for the film company that filed for Chapter 11 bankruptcy protection in July with $1.2 billion in liabilities after a string of box-office flops.

“The company can get back into the business that it belongs in,” said Wiles, at the end of a Bankruptcy Court hearing in New York that began Monday and stretched through Tuesday.

But the judge also said that several questions remained about the company's projected financing and its proposal to have actor Kevin Spacey and producer Dana Brunetti take over its movie studio.

The company must prove that its promised $80 million in financing is firmly in place, and that Spacey and Brunetti’s roles at the company are spelled out. Relativity lawyers said they would file documents and video testimony from Spacey and Brunetti to satisfy those demands by the next hearing in the case, scheduled for Feb. 17.

Even with the conditions, Wiles' confirmation marked a surprising turn of events from earlier in the proceedings and a partial victory for Kavanaugh as he seeks to stage a Hollywood comeback.

Wiles had indicated in the early hours of the hearing that he was not prepared to approve the plan. A delay of approval would have meant another setback for Kavanaugh, the brash entrepreneur who is trying to save the Beverly Hills company he founded in 2004.

The stakes remain high for Relativity as it works to officially exit Chapter 11 and get back to the business of releasing movies. Relativity hopes to release multiple long-delayed films, including the Halle Berry thriller “Kidnap” and the Kristen Wiig-Zach Galifianakis comedy “Masterminds.”

The company is depending on Spacey and Brunetti, known for their roles in producing the Netflix show “House of Cards” and movies such as “Captain Phillips,” to get it back on its feet.

Relativity stunned Hollywood in January when it announced it had entered an agreement that would make Spacey chairman of Relativity Studios — the company's film unit. Brunetti would be the division's president under the proposal.

The agreement was expected to help restore some of Relativity's credibility. The company on Monday played a videotaped message from Spacey for the court in which the Oscar winner said he was “enormously excited” for the firm's future. However, Relativity lawyers said at the hearing that a deal has not yet been signed.

Wiles said he wanted more clarity about the roles of Spacey and Brunetti. The judge also raised questions about the financial backing of Relativity at the hearing. He said a projected $60-million loan from Macquarie and $20 million in other financing needed to be more firmly locked in before he would give his full blessing to the exit plan.

“The margin for error is very small,” Wiles said.

Relativity's lawyers throughout the hearing scrambled to address Wiles’ concern and convince him that the plan was solid, pointing to testimony from Joseph Nicholas, a Chicago hedge fund investor who is set to run Relativity Media with Kavanaugh post-bankruptcy.

In a filed declaration, Nicholas said he has invested $80 million of his own money in Relativity over the last year. He said he was “aware of a number of funding sources” totaling “at least” $150 million for Relativity to rely upon when it exits bankruptcy, but he did not name specific partners.

21st Century Fox intends to trim its West Coast workforce to help reach $250 million in cost cuts this year at its TV networks and film studio.

Fox's corporate bottom line has been under increased pressure because of higher programming and marketing costs. In addition, several of Fox's TV networks...

21st Century Fox intends to trim its West Coast workforce to help reach $250 million in cost cuts this year at its TV networks and film studio.

Fox's corporate bottom line has been under increased pressure because of higher programming and marketing costs. In addition, several of Fox's TV networks...

(Meg James)

Kavanaugh has been trying to raise $100 million in equity financing to keep the company going, and in January the company announced it had successfully completed its funding. However, court proceedings this week revealed that what Kavanaugh has been able to lock down is nowhere near that promised amount.

Once it exits bankruptcy, Relativity would have a balance sheet of $20 million in cash and $280 million in debt.

Wiles' concerns partly echoed issues raised by lawyers for online video giant Netflix Inc., which has a deal to stream a certain number of Relativity's movies each year. Netflix had questioned the feasibility of the exit plan and the promised leadership positions of Spacey and Brunetti, and asked the court to end its contract with Relativity.

But the judge disagreed with Netflix’s objection, and Netflix agreed to withdraw its challenge.

Kavanaugh, who was at the hearing, cheered the outcome in a statement.

“Today we achieved an important milestone in Relativity’s path to emerging from Chapter 11 as a stronger, well-capitalized media company that is well positioned for growth and success,” he said.