A deal that would have been unimaginable just a couple months ago has now been finalized: Walt Disney Company announced that it will acquire 21st Century Fox, including Twentieth Century Fox movie and TV studios, most of its cable networks, international assets like Star and Sky and its stake in Hulu for $52.4 billion. The deal will be an all-stock transaction.

Just before the acquisition, assuming it passes regulatory hurdles, Fox will spin off news sports and the broadcast network to its shareholders and create “a new Fox.”

As part of the deal Robert Iger will stay on as chairman and CEO of The Walt Disney Company through 2021.

The company will also acquire Fox’s 30 percent stake in Hulu, giving it 60 percent ownership of the streaming service. Comcast/NBCUniversal has a 30 percent stake, while Time Warner controls the other 10 percent.

With the deal, Disney will also add mightily to its sports assets. The transaction includes Fox’s regional sports networks creating a national sports behemoth when combined with Disney’s ESPN. The new Fox will keep ESPN competitors Fox Sports 1 and Fox Sports 2 as well as the Big Ten Network, Fox News Channel, Fox Business Network and the FOX broadcast network.

“The acquisition of this stellar collection of businesses from 21st Century Fox reflects the increasing consumer demand for a rich diversity of entertainment experiences that are more compelling, accessible and convenient than ever before,” said Iger in a statement. “We’re honored and grateful that Rupert Murdoch has entrusted us with the future of businesses he spent a lifetime building, and we’re excited about this extraordinary opportunity to significantly increase our portfolio of well-loved franchises and branded content to greatly enhance our growing direct-to-consumer offerings. The deal will also substantially expand our international reach, allowing us to offer world-class storytelling and innovative distribution platforms to more consumers in key markets around the world.”

Rupert Murdoch, executive chairman of 21st Century Fox, said in his own statement, “We are extremely proud of all that we have built at 21st Century Fox, and I firmly believe that this combination with Disney will unlock even more value for shareholders as the new Disney continues to set the pace in what is an exciting and dynamic industry. Furthermore, I’m convinced that this combination, under Bob Iger’s leadership, will be one of the greatest companies in the world. I’m grateful and encouraged that Bob has agreed to stay on, and is committed to succeeding with a combined team that is second to none.”

"We’re honored and grateful that Rupert Murdoch has entrusted us with the future of businesses he spent a lifetime building." Bob Iger

Disney’s new assets will bolster the company’s global footprint, with India’s Star network and Europe’s Sky (Fox currently has a 39 percent stake. Disney said that Fox’s deal to buy the rest of the company will close by the middle of next year, and that Disney would then assume full ownership after its own deal with Fox closes). It will also give Disney majority ownership of Hulu, which could end up as the backbone of the company’s OTT service it plans to launch in 2019 as the company looks to take on Netflix directly.

On the theatrical side, the acquisition will align almost all of Marvel’s movie properties under the same company; currently, Fox has movie rights to the X-Men and Fantastic Four franchises, which also includes Deadpool; only Sony’s Spider-Man films would be made outside of the company. And Disney, which opened an Avatar-themed land opened at Walt Disney World’s Animal Kingdom in May, would have control over the Avatar franchise ahead of the coming four sequels that James Cameron has begun producing.

While the spun-off Fox assets will include several networks, the loss of its production studio will be a major blow to Murdoch’s bottom line, given the increasing importance of vertical integration, and will deprive the company of a key TV revenue source. Fox’s TV studio produces several of television’s biggest hits for a variety of cable and broadcast networks, including This Is Us, Modern Family, Empire, American Horror Story and Homeland.

The deal also represents a major shakeup for Fox Networks Group, which in May had tapped Joe Marchese as its new president of advanced advertising products. Marchese and his team will lose some of their biggest advertising assets in FX and National Geographic, though 21st Century Fox could end up rolling Fox News and Fox Business Network—currently run by Marianne Gambelli—into a single, company-wide portfolio.

Depending how Disney chooses to redistribute its ad sales organization (currently, ESPN’s ad sales team is separate from its other media properties, which are overseen by Rita Ferro), the company will end up with an advertising portfolio that would rival NBCUniversal’s.

"I’m convinced that this combination, under Bob Iger’s leadership, will be one of the greatest companies in the world." Rupert Murdoch

But even as the parameters of the deal finally are confirmed, staffers on both sides of the company—the section leaving for Disney and the part that will stay with the Murdoch family—are awaiting news about their fates and how each company will realign its assets. “We’re all in the dark over here,” said one company source.

News first broke early last month that Fox had been in talks to sell much of its company to Disney, and would shift to focusing on its news and sports properties. As those discussions broke off, other companies lined up to kick the tires, including Comcast, Verizon and Sony. But talks reignited, and quickly accelerated, between Disney and Fox, leading Comcast, which had been the most serious of the other suitors, to officially bow out on Monday night.

In recent weeks, Fox executives had kept publicly mum about the merger, while also insisting repeatedly that the company had the necessary scale to thrive in the changing media landscape.

Disney said it expects the deal to be approved by regulators and close within 12 to 18 months, though that timetable remains unclear. In October 2016, AT&T reached a deal to acquire Time Warner—a company that Fox made a failed $80 billion bid for in 2014. The Justice Department has sued to block that deal with a trial date set for March.