Roger Ailes, the closest thing in modern U.S. politics to a kingmaker, today stepped down as head of Fox News, the network he founded 20 years ago and turned into a potent political force.

James Murdoch and his brother Lachlan, both named by father Rupert to run parent company 21st Century Fox last year, pushed Ailes out on the heels of a sexual harassment suit that led to more allegations of sexual misconduct from female anchors. The brothers saw the situation as a way to remove a longstanding obstacle to their power within the company.

A lot of the news reports — most of the key details were first broken by New York Magazine’s Gabriel Sherman — centered on how the 76-year-old, a lifelong Republican, clashed with the two brothers politically, personally and as an executive. Ailes is known as a venal operator, specializing in deals with questionable reciprocity. His style was completely at odds with James, a data-driven technocrat, and Lachlan, the earnest Murdoch member.

Mostly true. A lesser-known but perhaps more important reason had to do with more practical issues — namely, the business of Fox News itself, according to sources.

The average age of Fox News viewers in primetime, the hours that draw the highest ad rates and so are the ones that matter, is 68 — a group that advertisers don’t pay to reach. In the world of cable news, marketers really only pay for viewers in the 25-54 age range. That means a good chunk of Fox News’ audience is worth little to nothing.

Fox News still mints money — it accounts for as much as 24 percent of the parent company’s yearly profit, or more than $1.5 billion — but a lot of that comes from licensing fees paid by distributors to carry the network, which are only negotiated every few years. Fox News still leads in total viewership and in primetime, but it can’t capitalize on a lot of that audience since advertisers don’t pay for a lot of these viewers.

That weighed on the future value of the network, as James saw it, according to one person familiar with the matter, and as much as Ailes’s style and politics were issues for both brothers, the more pressing concern was managing for the future of the network, this source said.

A great inside look at the palace strife around what to do with Ailes came from Michael Wolff this week, where he outlined James’s sense of the issue:

"Ailes is 76 and unhealthy, so how much longer could he last anyway?" the younger Murdoch is said to have asked, and to have argued: Since they would lose Ailes soon enough anyway, why not turn lemons into lemonade and get credit for kicking him out for being a sexist pig?

All three Murdochs agreed Ailes had to go, but James was the most vocal, according to one person close to the matter, and as much as it had to do with him ‘‘being a sexist pig,” the business of Fox News was the more immediate concern.

James wanted to start remaking the network, knowing Ailes wouldn’t or couldn’t at a time when fewer people are paying for television, the foundation of its and every other major media company’s business, and when younger people are simply flocking online for information.

In many ways, when Ailes first crafted Fox News in 1996, he presaged the modern internet — a network rife with invective and commentary, a slow burn of anger on every hour of the day. Fox News won the ratings just a year or so after 9/11, when political discourse was dominated by general fear.

With Ailes’s ouster, the Murdochs have a chance to remake the network not just for younger viewers, but for the internet, which no one’s quite figured out yet, so they’ve got some time.

Meanwhile, the person who’s temporarily replacing Ailes is none other than Rupert himself, who’s now 85.