AT&T and Time Warner just got the green light. Now it's time for the next round of media merger mania.

A federal judge's decision Tuesday to approve the deal between the telecom and media giants will almost certainly spur Comcast to submit its own bid for most of 21st Century Fox -— and soon. That would set up a showdown with Disney, which already locked in its own $52.4 billion bid for the same assets months ago.

Both companies want Fox for the same reason AT&T (T) wants to buy Time Warner (TWX): survival. Fox's TV channels like FX and movie franchises like "Avatar" and "X-Men" are coveted properties that could help Comcast (CMCSA) or Disney (DIS) beat back digital competitors like Netflix.

Wall Street is betting the court decision will spark a wave of other deals. Shares of CBS (CBS), Viacom (VIA), Lionsgate (LGFA) and Discovery (DISCA), for example, were all up after hours. Those companies have either said publicly that they want to explore mergers or have been mentioned as potential targets for acquisition.

But the war over Fox could officially kick off as soon as Wednesday. It's been a long time in the making. Before Disney reached a deal for most of company last December, Comcast had been in talks with Fox, too.

Related: Judge approves $85 billion AT&T-Time Warner deal

Major Fox investors were skittish about Comcast's proposal in part because they weren't sure it would win over government regulators. At the time, the Justice Department had just sued over the AT&T-Time Warner deal, which shares many parallels.

Like AT&T, Comcast is a content distributor trying to buy a content creator, and it has similar size and ability to wield significant power in negotiations with other pay-TV operators. One concern in the AT&T case was whether the telecom company could drive up costs for competitors who want to broadcast channels like CNN, TNT and TBS, which are all Time Warner properties.

Tuesday's decision provides no guarantee for Comcast and Fox. Judge Richard Leon, who heard the AT&T-Time Warner case, cautioned in his ruling that he was not setting a precedent for all mergers. He wrote that the "temptation" to view the AT&T decision as "something more than a resolution of this specific case should be resisted by one and all!"

If Comcast does make a bid, though, Disney will be a big obstacle. A deal between Disney and Fox would look a lot different structurally than AT&T's purchase of Time Warner, and raise a different set of antitrust questions. Both companies are content creators, and Disney doesn't control any pipes. A deal would create a Hollywood titan, combining the largest and fourth-largest movie studios.

Makan Delrahim, the Justice Department's antitrust chief, suggested that he would be receptive to that combination at a conference in New York last Thursday — mainly because Disney, which owns ABC and ESPN, would not be buying Fox's biggest sports channels and broadcast network.

Gene Kimmelman, the president and CEO of the consumer advocacy group Public Knowledge, said the government could still find issues, though. A combined Disney-Fox would dominate the box office. The former already controls the Marvel Cinematic Universe and "Star Wars," two of the most successful franchises in the world, and Fox would add more heavy hitters to the roster.

Related: What Comcast, Disney and Fox all see in Sky

"It's a substantial combination of some of the most valuable studio properties," Kimmelman added.

So far, Fox's Rupert Murdoch has seemed to favor a pact with Disney. But there are several factors, including the structure and tax implications of each deal, that could sway Fox one way or the other.

Comcast has a shot at turning the tables, according to BTIG Research analyst Rich Greenfield. If it proposes an all-cash deal that would be worth more than Disney's original stock bid and, Greenfield said, hard for Fox shareholders to resist.

"Why own Disney when you can buy any stock you want with cash?" he wrote in a blog post last month.

Even so, Disney could match the Comcast bid, analysts at MoffettNathanson said last month, possibly by coming up with an additional $10.4 billion in cash on top of its existing offer.

"That seems like a small price to pay for getting this deal done," they wrote in a research note.

If Comcast does make a formal offer, Fox's board of directors would need to determine whether it's reasonably likely to be better than Disney's offer. In that case, they would start negotiating with Comcast. Should the board decide Comcast has a better deal, Disney would have five days to come up with a counter.