Lionsgate has sealed an agreement to acquire premium cabler Starz in a $4.4 billion cash and stock deal.

The deal had been expected. The two companies have flirted with a merger on and off for more than a year. The two were united in a corporate marriage early last year by investor John Malone, the majority shareholder in Starz who also acquired a stake in Lionsgate last year. Malone’s stake in Lionsgate will grow through the Starz acquisition pact as he will receive voting and non-voting Lionsgate shares in exchange for his preferred Starz Class B stock.

Malone’s personal stake in Lionsgate is believed to grow to about 7.5% of voting power in the company with the transaction. In addition the Malone-affiliated Liberty Global and Discovery Communications each hold 3.4% stakes in Lionsgate.

Lionsgate said the deal in total values Starz shares at $32.73, an 18% premium over the 20-day average trading price for Starz as of June 28. Starz shares have been on the rise for the past few months as acquisition rumors heated up.

“This transaction unites two companies with strong brands, complementary assets and leading positions within our industry,” said Lionsgate CEO Jon Feltheimer and vice chairman Michael Burns. “We expect the acquisition to be highly accretive, generate significant synergies and create a whole that is greater than the sum of its parts. (Starz CEO) Chris Albrecht and his team have built a world-class platform and programming leader, and we’re proud to marshal our resources in a deal that accelerates our growth and diversification, generates exciting new strategic content opportunities and creates significant value for our shareholders.”

The deal calls for Starz shareholders to receive $18 in cash and non-voting shares in Lionsgate. The transaction will see Lionsgate shares reclassified into voting and non-voting shares, a structure that is common in Malone-affiliated companies. Malone’s investment in Starz was a personal holding rather than through his Liberty-branded holding companies. However, Liberty Media CEO Greg Maffei serves as chairman of Starz.

“Jon, Michael and the rest of the Lionsgate team have built the first major new Hollywood studio in decades, and we’re thrilled to join with them in a transaction that multiplies the strengths of our respective businesses,” said Albrecht, who earlier this week signed new employment contract that runs through 2020. “Our similar entrepreneurial cultures and shared vision of the future will make this alliance an incredible fit that creates tremendous value for our shareholders, great content for our audiences and limitless opportunities for our newly-combined company. I am very appreciative of the work, passion and dedication of both of our companies’ employees and more enthusiastic than ever about the future of our business.”

Lionsgate said it expects to fund the deal with a combination of loans and bonds. It will raise the studio’s debt leverage to 5 to 5.5 times earnings, although the cash flow provided by Starz will help them whittle down that debt, the company said. The deal is expected to close by year-end.

The big question raised by the deal is how it will affect Lionsgate’s participation in Epix, the premium movie channel it owns with Viacom and MGM. Lionsgate has about a 30% stake in Epix, which has been the pay TV home for its movies since 2009. In the short term, execs said, the Epix partnership will remain intact.

Another potential hurdle on the horizon during the period when the deal closes is a renewal of Starz’s carriage agreement with AT&T’s DirecTV, the single-largest MVPD in the nation. The deal at present is worth an estimated $350 million a year to Starz. If AT&T decides to flex muscle and hammer Starz for concessions, that deal could affect the underlying projections for the merger.

Lionsgate and Starz billed the union as a natural fit of a studio that is increasingly invested in high-end TV content and a premium cable group that has momentum with original programming for the first time since its launch in 1994. Starz’s buzzy dramas at present include “Outlander” and “Power.” Starz has de-emphasized its focus on theatrical movies in the past few years under Albrecht. Sony Pictures is the only studio with which Starz has a movie output deal. That pact runs through 2021.

Starz will give Lionsgate a strong platform to launch series that can be sold around the world. Starz is at the outset of expanding its reach internationally. It also followed the lead of premium rivals HBO and Showtime by launching a standalone broadband-only offering to reach viewers who don’t have a traditional pay TV package.

“Chris Albrecht and his team have grown Starz into an industry leader that provides highly-rated and diverse content, drawing critical claim and brand recognition for Starz,” Maffei said. “Together, Lionsgate and Starz form an entertainment powerhouse with a world-renowned studio that produces blockbuster movies and channels with must-have programming that will be able to capitalize on content opportunities across multiple platforms. The combined company will be well-positioned to return more value to our shareholders and effectively compete in the global media marketplace.”

Starz brings to Lionsgate a collection of 17 Starz- and Encore-branded premium channels. It also owns the Anchor Bay Entertainment home video distribution banner, which has handled Weinstein Co. film releases among other third-party content. Lionsgate’s library of film and TV series will surely offer a boost to the schedules of the Starz and Encore channels, beyond the flagship Starz network.

Touting the scope of the deal, Lionsgate told investors in a conference call Monday that the combined company would invest $1.8 billion annually in new film and TV content. If the deal is completed Starz’s network operations will account for 60% of the enlarged company’s 2016 operating income on a pro forma basis, with Lionsgate film operations delivering 22% and its TV production arm delivering 12%.

LionTree Advisors and Raine Group are serving as financial advisors to Starz in the transaction. PJT Partners is lead advisor to Lionsgate along with J.P. Morgan, Bank of America Merrill Lynch, Deutsche Bank and Credit Suisse.

(Pictured: “Outlander”)