ViacomCBS has reached a deal to acquire a 49% stake in Miramax from Qatar-based owner BeIN Media Group for a total of $375 million.

The deal calls for ViacomCBS to pay $150 million in cash up front, plus a commitment to invest $45 million a year for five years to fund new film and TV projects and working capital. ViacomCBS’ Paramount Pictures gets an exclusive long-term deal for worldwide distribution rights to Miramax’s library of about 700 movies. The partners will also work together on developing new projects and reboots and revivals of titles from the Miramax vault.

“Miramax is a renowned global studio, responsible for some of the most iconic films of the last three decades, including ‘Pulp Fiction,’ ‘Good Will Hunting,’ ‘Kill Bill’ and more,” said Bob Bakish, president-CEO of ViacomCBS. “This partnership with beIN will be a unique opportunity to gain access to a valuable library, deepening our already substantial pool of IP at a time when demand for premium content is only accelerating. We look forward to working closely with the Miramax management team as we explore new ways to deliver its titles across a variety of platforms and create new, compelling projects.”

BeIN Media Group chairman Nasser Al-Khelaifi said the sale is not a retrenchment from Hollywood but a reinforcement of the company’s desire to grow its entertainment operations. BeIN Media assets began as the sports arm of Al Jazeera but the company is now a separate entity. BeIN Media acquired Miramax from private equity owners in 2016. The company sees the ViacomCBS deal as a win in bringing in a partner with strategic assets that can grow the company while still allowing BeIN Media to retain a slim majority stake. BeIN Media is said to have an appetite for additional content acquisitions.

This represents a major investment in and endorsement of our thriving Miramax business, which has grown in value under BeIN Media Group’s ownership and has a fantastic future ahead with major new movies and unexploited premium dramas,” Al-Khelaifi said. “We are thrilled to partner with ViacomCBS and Paramount to explore further opportunities around Miramax’s iconic IP, and also at Group level; while substantially increasing the scale of our entertainment business. This deal further underlines beIN’s ambitions on the global stage – we are very proud to have established ourselves as one of the leading groups in sport, entertainment and media.”

The partners said BeIN Media intends to retain the remaining 51% of Miramax. The studio’s current management team headed by film biz veteran Bill Block will continue to lead the company. The deal is expected to close in the first quarter of next year.

Miramax had been dormant for years amid the ownership shuffles, but under Block’s direction the studio resurfaced in a noticeable way last year with the successful relaunch of the “Halloween” horror franchise. Up next, Miramax has the family drama “Uncle Frank” set to premiere at Sundance next month and crime dramedy “The Gentlemen,” starring Matthew McConaughey and Hugh Grant, also bowing next month. “Gentlemen” is the first of a two-picture pact with director Guy Ritchie.

Moelis & Co.’s Carlos Jimenez and David Eisman and Glen Mastroberte in the entertainment unit of Skadden Arps represented BeIN Media Group in the sale. Guggenheim Securities and O’Melveny & Myers represented ViacomCBS.

(Pictured: “Pulp Fiction”)