21st Century Fox Executive Chairman Rupert Murdoch invited Walt Disney Co. Chief Executive Robert Iger to his winery in Los Angeles last month as the executives were trying to nail down a deal that would mark a turning point in both of their careers.

After a lunch of chicken and salad, the executives opened a bottle of Chardonnay and walked through the vineyard to hash out terms under which Disney would buy Fox assets, people familiar with the discussions said. A few weeks later, as the talks reached the final stretch, the same property was threatened by a 422-acre brush fire that swept through the upscale Bel Air neighborhood.

The winery survived, and so did the deal.

Disney said Thursday it agreed to buy most of 21st Century Fox Inc. for $52.4 billion in stock, in a deal that would give Disney a dominant position in movies and sports and help bolster its flagging television business as it prepares to directly challenge digital giants like Netflix Inc.

Disney is buying the Twentieth Century Fox television and film studios, cable networks including FX and National Geographic Channel, Star India, a 39% stake in Sky, 22 regional sports networks and majority control of streaming-video service Hulu.