In a blow to Sony Pictures, Lone Star Capital is ending its co-financing partnership with the studio after a series of film flops.

The deal with the Texas-based private equity firm will end at midnight on Monday. The pact was arranged through Lone Star’s credit affiliate, LStar. It had been supposed to co-finance “The Emoji Movie,” “Flatliners,” “The Star,” “Peter Rabbit,” and “Hotel Transylvania 3.”

Some of these films, such as “Flatliners” and “The Star” have co-financing partners lined up — a group of companies that includes Cross Creek and Walden. The Lone Star deal was not a profitable one for the financier and included such misses as “The Brothers Grimsby,” “Life,” and “Smurfs: The Lost Village.”

A spokesman for Sony Motion Pictures Group said Monday that the deal’s conclusion had been anticipated and would not have a negative impact on the studio.

“Lone Star has been a great partner for several years and as anticipated, the deal has concluded – and on a high note,” the spokesperson said. “The decision to part ways was mutual, and won’t impact the studio’s plans or our strong slate of upcoming films moving forward.”

Going forward, Lone Star may sell off its participation in future movies to another fund or company. DMG has ties to the financier and the studio, at one point, looked at potentially buying out its investment. However, a source with knowledge of the talks, said that DMG had walked away from talks with Sony about coming on board as an investor.

The Lone Star deal was signed in 2014 under the administration of Amy Pascal, who left her post as chairperson of the Motion Pictures Group of Sony Pictures Entertainment in early 2015 and was replaced by Tom Rothman. A studio insider said that Rothman had not been happy with the terms of the deal, believing them to be too generous, and did not see Lone Star’s exit as bad for the studio. Moreover, under Rothman Sony has been reining in budgets. It will still spend money on major superhero films and a few select blockbuster aspirants, but it is trying to become more economical, which reduces its need for a partner to defray costs and risks.

Still, it has been a bruising period for the studio. Sony has not hit the $1 billion milestone in annual domestic grosses since 2014. The studio generated only two 2016 titles with more than $100 million in domestic grosses last year with “Ghostbusters” at $128 million and “The Angry Birds Movie” at $107 million.

Sony’s top performer this year by far is “Spider-Man: Homecoming” with $208 million domestically and $468 million worldwide after less than two weeks. It also scored a low-budget hit with “Baby Driver,” a thriller with Ansel Elgort that has grossed nearly $100 million worldwide on a $34 million budget. The company is looking to continue the rebound with a sequel to “Jumanji” and spinoff Spider-Man movies based on Venom, Black Cat, and Silver Sable.