Democratic Senate candidate Beto O'Rourke concedes defeat to incumbent Republican Sen. Ted Cruz after Tuesday's vote. (Larry W Smith/EPA-EFE/REX/Shutterstock)

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

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

The totals spent by campaigns and special-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 as much as $8.9 billion was spent to promote candidates in Tuesday’s races.

More than half that ($4.5 billion) was 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 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 with the previous year, much of it from political spending.

CBS took in nearly $400 million in additional ad revenue in its most recent quarter, 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 what are called O&Os — owned-and-operated TV stations, in relationships that date to the middle of the 20th century.

Fox is, by station, the biggest player in this game, with 17 O&Os. That allowed the company to benefit handsomely in recent months. The Rupert Murdoch conglomerate owns stations in three markets in Florida, which experienced 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 Sen. Ted Cruz (R) of Texas 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 include 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&Os.

It may seem surprising that these giant companies still own local television stations. Outfits with such scale seemingly wouldn’t want to bother with such a parochial business — 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 President Dwight D. 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 revenue taken in by TV outlets, according to one tally, was just $1.7 billion. This year’s haul nearly tripled that.

The question now is what the companies will do with these newfound riches.

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

Netflix backed up the truck for “The Crown” ($10 million per 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.

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 skimp on re-creating the 19th-century sets.

While conglomerates can use an injection of several hundred million dollars in multiple ways — different “capital allocation priorities for every owner,” as Brian Wieser, analyst at New York-based 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.” Thanks to political advertising, they now have a lot more cash to pour into already-expensive shows and up their investment in lower-cost ones.

“They must feel like Scrooge McDuck this morning, waking up to all of the newfound riches in their vaults,” said Lloyd Greif, a Los Angeles-based investment banker who closely follows the media and entertainment space, about the conglomerates. “This additional ammunition will burn a hole in their pockets until they find good uses for it,” he added, noting content investment and acquisitions as potential targets “No one’s going to be happy earning money-market returns on this capital.”

The money could also help conglomerates sign up creators and new shows. The traditional studios have been fighting a losing battle to retain top talent in recent months, as Netflix has paid “American Horror Story” creator Ryan Murphy $300 million and “Black-ish” creator Kenya Barris $100 million. With the revenue Disney gets from political advertising, it could afford a few Barrises or a couple of new shows a Barris would create.

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 TVs, they’ll certainly see its effects.

Correction: A previous version of this story suggested TNT’s “The Alienist” is set in the 18th century. It is set in the 19th century.