Luc Besson’s financially struggling EuropaCorp is to be taken over by the New York investment fund Vine Alternative Investments, its junior lender, Variety has confirmed.

EuropaCorp confirmed the talks with Vine on Sunday but declined to comment on the deal because negotiations are ongoing with both Vine and EuropaCorp’s senior lender, JP Morgan, which would also have to sign off on the deal.

The French studio behind “Taken” and “Valerian and the City of a Thousand Planets” had been in discussions with Pathe for the latter to take a majority stake in the company. But those talks failed because Pathe could not reach an agreement on restructuring EuropaCorp’s debt to Vine of €80 million, according to three financial sources. EuropaCorp’s credit line with Vine matures in April 2020.

The new deal – which was first reported by the French newspaper Le Journal du Dimanche – will see Vine convert the debt into a stake in EuropaCorp. The studio’s attractive film library, whose value was estimated at €139 million as of March 2018, is already held in escrow by the company’s senior lender, JP Morgan (€138 million) and to a small extent by Vine. Vine could now directly deal with JP Morgan to buy the remainder or at least some more of the library. EuropaCorp’s credit line with JP Morgan matures in October.

EuropaCorp’s main shareholders are Besson’s holding company, Frontline (38%), and China’s Fundamental (28%).

The French commercial court will have to greenlight the pact with Vine. In 2017, Vine bought a controlling stake in Village Roadshow Entertainment Group with Falcon Investment Advisors.

EuropaCorp is only halfway through the six-month debt waiver it obtained from the commercial court to stabilize its finances. But Besson’s latest film, “Anna,” which was just released in France, is looking like a second consecutive box-office disappointment after “Valerian and the City of a Thousand Planets,” and no other films are in production.

“Anna” has made only $7.4 million dollars in the U.S. since its June 21 release by Lionsgate. In France, where Besson’s movies usually do well, the film had an underwhelming opening day July 10, with 80,000 tickets sold, in spite of Pathe’s big marketing push. The movie is now out in nearly 20 foreign countries and has grossed under $4 million outside of the U.S.

Pathe is releasing “Anna” in France as part of its three-year distribution deal with EuropaCorp, which stopped its direct-distribution operations at the end of last year among many other measures aimed at limiting risks and reducing its overhead.

EuropaCorp previously held discussions with several high-profile companies, including Netflix, but the talks froze after Besson was hit with rape allegations by the actress Sand Van Roy last year. A nine-month police investigation into Besson was dismissed in February.

EuropaCorp just posted a 34% year-on-year drop in annual revenue and a loss of $125 million for the financial year that ended March 31.