The midterm elections that saw the Democrats retake the House and Republicans widen their lead in the Senate was a boon to traditional media companies, who raked in huge sums of money on political advertising.

That could have an effect on corporate bottom lines — and on a distant realm deep in the entertainment landscape.

The totals spent by campaigns and interest groups on advertising in 2018 were staggering. If a few commercial breaks worth of television-viewing this fall didn’t already tell you how open the wallets were, the professionals laid it out. The advertising-research firm Borrell Associates estimates that as much as $8.9 billion was laid out to promote candidates in Tuesday’s races.

More than half that, the group says, lay in the area of traditional television advertising, which remains the most effective way to reach the most people at once, especially older demographics most likely to vote. “Broadcast TV is reaping the biggest bounty of this year’s hotly contested elections,” the company said in its report.

That means a whole lot of cash went to the bottom lines of the country’s large entertainment conglomerates.

In the quarter leading up to the election, Comcast Universal reported a gain in advertising revenue of $380 million compared to the previous year, much of it from political spending.

CBS took in nearly $400 million in additional ad revenue in its most recent quarter, also, it said, largely because of political ad spending.

21st Century Fox, meanwhile saw advertising revenue climb 38 percent to $168 million, driven by “higher political advertising revenue related to the midterm U.S. elections at the TV stations,” it said in its quarterly earnings report Wednesday. Disney which will report its quarterly earnings Thursday, is expected to see a major bump as well.

The conglomerates still hold significant stakes in this sector via the so-called “O&O’s” — owned-and-operated TV stations, relationships that date all the way back to the middle of the 20th century.

Fox is, by station, the biggest player in this game, with 17 such O&O’s. That allowed the company to benefit handsomely in recent months. The Rupert Murdoch conglomerate owns stations in three markets in Florida, which saw a flurry of advertising in contested gubernatorial and Senate races, as well as stations in Dallas and Houston, key sites in the battle between incumbent Texas Sen. Ted Cruz, R, and Democratic challenger Beto O’Rourke, which Cruz won.

Many of the other conglomerates aren’t far behind. Disney owns stations in the country’s three largest cities; its properties includes markets in Illinois and Pennsylvania, which featured a bevy of hot races. CBS has stations in the two biggest Pennsylvania markets, as well as in South Florida and New York, all places with intense electoral fights. Comcast has a similar mix with its NBC O&O’s.

(It may seem surprising that these giant companies are still in game of owning the local television station. Outfits with such scale wouldn’t seemingly want to bother with a business so seemingly parochial; WVIT Hartford isn’t exactly a global superhero franchise. But these relationships and the reliable ad dollars they provide have proved remarkably durable — and revenue-yielding — in a time of so much digital competition. WVIT is owned by Comcast-NBC Universal, a relationship that began when Eisenhower was coasting to a second term.)

This means the conglomerates took in sacks of cash they rarely collect in nonpresidential years. In the midterms four years ago the total outlay, according to one tally, was just $1.9 billion. This came in at more than quadruple that.

The question now is what they’ll do with all these newfound riches.

While companies don’t break out where they invest profits, one area they’ve been desperately hungry for cash is in television content. Content costs have risen greatly in the past several years, powered by the influx of free-spending technology players such as Netflix and Amazon, and the consumer expectation for more and better shows that comes with them. (Amazon’s chief executive, Jeff Bezos, owns The Washington Post.)

Netflix backed up the truck for “The Crown” ($10 million/episode) and “Stranger Things” ($8 million), according to a report last year in the trade publication Variety.

In response, broadcast networks and the studios that feed them have been spending more to compete so that these productions can look a lot closer to Netflix and a lot less like the usual broadcast fare, which in the past cost just a few hundred thousand dollars per episode. After all, consumer eyeballs make no distinction between these platforms.

So spend they have. Sitcoms on broadcast have climbed as high as $3 million per episode, according to the Variety report. Network dramas like “Chicago Fire” (NBC’s Universal Television) and “This Is Us” (Twentieth Century Fox Television) look as slick as they do because their budgets are higher — used to hire bigger-name directors, employ more sophisticated cameras, shooting techniques and generally upping the polish.

This is true on cable too — TNT’s “The Alienist” earlier this year ran to a belt-popping $7.5 million per episode, as producers didn’t stint on re-creating the 18th-century sets.

While conglomerates can use an injection of several hundred million dollars in multiple ways — different “capital allocation priorities for every owner,” as Bryan Wieser of analyst at New York-based analyst firm Pivotal put it — spending more on content is widely regarded as the greatest priority for these companies, as they look not to be left behind in the era of Peak TV. And thanks to political advertising, they now have a lot more cash with which to do it. The infusion will allow them to pour more money into already-expensive shows and upping their investment in lower-cost ones.

As midterms fade and a lull sets in before presidential campaigning, viewers will get a break from political advertising. But when they turn on their TV’s, they’ll certainly see its effects.