“What we were always concerned about inside is that when he’d do a spending deal or make an announcement that was controversial, and then Fox would attack him, and he’d blow it up the next day,” the former official said. “We’d call the hosts and say, ‘Please can you tamp it down a bit?’ Because we were afraid the next day he’d rip it up. . . . They usually were pretty good about working with us.”

But Trump demanded an unattainable level of loyalty from the network. His reelection campaign at one point asked for a bulk discount advertising deal. Fox said no, noting that everyone has to pay the same rates, according to two people familiar with the exchange — leaving Trump extremely unhappy with Fox.

In recent months, he had begun to complain — on Twitter and to his aides — that Fox had turned on him. That impression was only heightened when reports emerged that Murdoch was telling associates that the president was going to lose. Even as the New York Post, another Murdoch-controlled property, published a dubious front-page article last month, facilitated by Trump attorney Rudolph W. Giuliani, that alleged nefarious business dealings by Biden’s son Hunter, the personal relationship had undeniably cooled.

Trump took any perceived slight from Fox News especially personally because he viewed Fox as “my network,” three administration officials said. “I give Fox these mega-ratings. It’s all me,” Trump has told advisers, according to a person who heard the comments.