For a while, Rupert Murdoch seemed invincible.
First, the mogul emerged relatively unscathed from a 2011 phone hacking scandal involving his British tabloids that threatened to upend his empire. Then, he installed his sons, Lachlan and James, in leadership roles at 21st Century Fox. And, last year, the thrice-divorced Mr. Murdoch married Jerry Hall, a former supermodel 25 years his junior.
But even Mr. Murdoch, a self-made billionaire whose range of media assets wield enormous political influence on three continents, was no match for Silicon Valley.
Like King Lear confronting his mortality, Mr. Murdoch, 86, is preparing to divide up a lifetime of spoils. And as he moves to sell off wide swaths of his media and entertainment business, he is also throwing into confusion the line of succession and testing the ties that bind the family-run fief.
The Walt Disney Company announced on Thursday it had reached a deal to acquire most of 21st Century Fox Inc., the Murdoch-owned company that includes the storied movie and television studio, national cable networks like FX and National Geographic, 22 regional cable channels dedicated to sports and a 39 percent stake in Britain's pay TV service, Sky.
The $52.4 billion deal — which would not include Fox News, the Fox broadcast network or the FS1 sports cable channel, which will be spun off into a newly listed company — has come about as part of the consolidation sweeping over traditional media companies as they try to fight off threats from Amazon, Apple and Netflix. It also represents a remarkable shift for Mr. Murdoch, a visionary businessman who has long lived by a single credo: Buy, buy, buy.
After all, Mr. Murdoch didn't grow a single newspaper in Adelaide, Australia, into a $100 billion media business by selling. "Rupert has always been a collector, a builder," said Laura Martin, an analyst at Needham & Company.
In 2007, when newspapers were facing a decline, Mr. Murdoch defied Wall Street investors and his own advisers to pay $5 billion for Dow Jones, the company that publishes The Wall Street Journal. Why? Because he wanted to.
In 2012, under pressure in the wake of the phone-hacking scandal, Mr. Murdoch split his entertainment assets into a separate publicly traded company, 21st Century Fox, from News Corporation, the company that includes The Journal, the New York Post and other newspapers. For a time Mr. Murdoch's enterprise looked like an entertainment company with a newspaper problem, with glitzy Hollywood assets and lucrative Fox News keeping Mr. Murdoch's true love, printed papers, afloat.
But 21st Century Fox soon faced the same economic headwinds affecting other traditional media companies that have been disrupted by the rise of digital: customers cut the cable cord and streamed TV shows and movies on multiple devices. At the same time, Fox News, the highly rated basic cable channel and a big moneymaker, has suffered setbacks after a series of sexual harassment allegations at the network led to high-level departures and costly legal settlements.
Mr. Murdoch must have known he needed to get even bigger to survive. But lately his buying prowess has taken a hit. In 2014, investors rebuffed him when he tried to gain scale with an $80 billion offer for Time Warner Inc., the company that owns HBO and CNN — and which may end up the property of AT&T, if a deal long in the making survives the scrutiny of a skeptical Justice Department. Regulatory hassles have also thwarted Mr. Murdoch's efforts to pay $15 billion for the 61 percent stake in Sky not already owned by 21st Century Fox.
"He tried to buy, and when that didn't work, he doesn't sulk — he sells," Ms. Martin said.
Disney's planned acquisition of 21st Century Fox — Mr. Murdoch's confidants call it a merger — makes economic sense, analysts say, and may be the best way for Mr. Murdoch's broader empire to thrive. But it also makes the identity of his heir less apparent.
Mr. Murdoch's younger son, James, 44, has reinvented himself since an intense legal imbroglio in Britain that sprang up after the News of the World tabloid hacked into the voice mail of a 13-year-old murder victim. James Murdoch, who is said to be supportive of the Disney deal, left his post in London, moved to the United States and took over one of his father's jobs: chief executive of 21st Century Fox.
Lachlan Murdoch, the elder brother at 46, has been caricatured as the prodigal son. He left the family business in 2005 and was happily living out of the fray in Australia, with a supermodel wife and a trust fund. But as part of Mr. Murdoch's succession plan, Lachlan returned to the United States in 2015 to serve with his younger brother — and alongside his father, as co-executive chairman — at 21st Century Fox. Seen by some insiders as a daddy's boy, he moved into his father's former office on the company's palm-tree-lined lot in Beverly Hills.
Questions abound about which son would carry on the family legacy, should the Disney deal go through. (Mr. Murdoch's older daughters, Prudence and Elisabeth, have stayed mostly out of the business, and his younger daughters, Grace and Chloe, are teenagers.)
"You have this issue with two sons who are seemingly capable of commercial success and, if you're Rupert, you want to leave them both in a good spot, for lack of a better spot," said Brian Wieser, an analyst at Pivotal Research.