The Weinstein Co., reeling from sexual harassment and rape allegations against ousted co-founder Harvey Weinstein, has secured some much-needed financial relief from Los Angeles billionaire Thomas Barrack.

The mini-studio announced Monday that it has entered into an agreement for Barrack’s private equity firm, Colony Capital, to provide a cash infusion to the New York company.

Colony and Weinstein Co. — known for producing films such as “The King’s Speech,” “Django Unchained” and the reality television series “Project Runway” — also said that they have entered a negotiation period for a sale of all or part of the beleaguered firm’s assets. Financial details were not disclosed.

The deal with Barrack, a close ally of President Trump, is a sign of how dire the situation is for Weinstein Co., outside bankers told The Times. The studio was already struggling because of the poor performance of its films, and the mounting allegations against its former co-chairman have further threatened its survival. The company has swiftly lost board members and valuable TV deals in the wake of the scandal.

“There's a desperation that is dense in the air coming from the Weinstein Co.'s headquarters,” said Eric Schiffer, chief executive of the Patriarch Organization, a private equity firm. “It’s like being on the Hindenburg when everyone’s jumping off.”

The Colony Capital announcement underscored the deep divisions within Weinstein Co.’s board of directors, who have sparred over the company’s future. Bob Weinstein, now the lone chairman, said Friday that the business was not shutting down or for sale, but his statement was immediately met with skepticism, even from inside the studio.

Notably, Bob Weinstein was not mentioned in the Colony Capital announcement, which characterized the capital infusion as a way to stabilize the firm. Bob Weinstein and his brother own 42% of the company. His representative did not respond to a request for comment.

“We believe that Colony's investment and sponsorship will help stabilize the company's current operations, as well as provide comfort to our critical distribution, production and talent partners around the world,” Weinstein Co. board member Tarak Ben Ammar said in a statement. “Colony's successful experience and track record in media and entertainment will be invaluable to the company.”

Looming over any deal-making, however, is the widening criminal investigation into Harvey Weinstein’s alleged behavior. The New York Police Department has opened an investigation into a 2004 rape allegation and is reexamining a more recent sexual assault allegation that was previously rejected by prosecutors, according to a law enforcement source not authorized to comment.

In Britain, actress Lysette Anthony filed a formal crime report with Merseyside Police alleging she was raped by the movie mogul at her London home in the late 1980s. London's Metropolitan police acknowledged that on Oct.11 they opened a formal probe into an allegation from that period.

Weinstein has denied all allegations of nonconsensual sex.

The negotiations with Colony Capital come less than two weeks after the New York Times published an investigation detailing decades of alleged sexual harassment by Weinstein. Last week, the New Yorker published its own investigation in which three women accused him of rape. Numerous other women have also come forward with allegations against Weinstein and other men in Hollywood. His accusers include Angelina Jolie, Gwyneth Paltrow and Rosanna Arquette.

The producer has apologized for some of his behavior and denied the rape claims. But the backlash against him and his company has been swift. On Oct. 8, Weinstein Co. fired him. On Saturday, he was expelled from the Academy of Motion Picture Arts and Sciences.

Barrack and Colony Capital are no strangers to the Weinsteins or to Hollywood. In 2010, a group of investors including Colony Capital and construction magnate Ronald Tutor bought film and TV firm Miramax — which was founded by Harvey and Bob Weinstein — from Walt Disney Co. (The Weinsteins had left Miramax in 2005.)

Barrack sold Miramax to Qatar broadcaster BeIN Media Group last year. Colony also helped set up a TV joint venture between Miramax and Weinstein Co. in 2013. Last year Weinstein Co.’s television business was estimated to be worth about $650 million.

“We believe the [Weinstein] company has substantial value and growth potential,” Barrack said in a statement. “We will help return the company to its rightful iconic position in the independent film and television industry.”

The billionaire, who made his fortune in real estate, was a staunch supporter of Trump’s presidential campaign, landing a major speaking gig at the Republican National Convention last year. He also chaired Trump’s inaugural committee. Harvey Weinstein, by contrast, was a big fundraiser for Democratic politicians, including Hillary Clinton.

In 2008, Barrack saved Michael Jackson’s Neverland Ranch from foreclosure when Colony acquired a loan that was in default.

Barrack swooped in for Weinstein Co. as its future is looking increasingly bleak. Amazon Studios cut ties with Weinstein Co. last week, dooming a high-profile television project from director David O. Russell. Amazon had ordered two seasons of the untitled drama. Amazon will continue with a second show it was co-producing with Weinstein Co., but it will go forward without the studio’s involvement.

On Friday, investment banking firm Goldman Sachs said it was exploring options for what to do with its small stake in the studio. A Goldman Sachs spokesman has said the firm’s stake is now worth less than $1 million.