Comcast is going all-in to win 21st Century Fox.

The company on Wednesday formalized a $65 billion all-cash bid for most of Fox. It's a dramatic attempt to thwart Disney, which reached a $52.4 billion deal in December for the same film and TV assets.

Comcast's (CMCSA) move came one day after a federal judge approved AT&T (T)'s $85 billion acquisition of Time Warner (TWX). The Justice Department had sued to stop the deal. (CNN is a unit of Time Warner.)

The Comcast offer sets the stage for a high-stakes bidding war between two of the biggest players in media and telecom. Both Comcast and Disney (DIS) are eager to buy Fox to bolster their positions in a changing industry.

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

Consumers are cutting their cable subscriptions and spending more time with online services like Netflix (NFLX). Purchasing Fox is a way to scale up.

The winner of the Comcast-Disney showdown would get Fox's movie studio, which is responsible for franchises like "Avatar" and "X-Men," along with Fox's regional sports networks and cable channels like FX and National Geographic.

And the deal would come with Fox's stake in Hulu, the streaming service with 20 million viewers. Both Comcast and Disney have their own stakes in Hulu, and whoever gets Fox would control the majority. (Time Warner owns 10%.)

Comcast wants Fox's stake in Hulu but would part with it if necessary to satisfy regulators, a source familiar with the company's thinking told CNNMoney. The Wall Street Journal reported similar thinking earlier Wednesday.

Fox would also give up its stake in the European broadcaster Sky, which would help either Comcast or Disney expand its footprint abroad.

Both those companies eventually want all of Sky. Fox has a pending deal for the rest of the broadcaster, which it agreed to pass off to Disney. Comcast is bidding independently for the same stake, leaving Sky's fate uncertain.

Disney and Comcast could even end up splitting ownership. Comcast CFO Mike Cavanagh told investors Wednesday that the company stands behind its own Sky offer "independent of whatever happens to Fox."

Fox's Rupert Murdoch is keeping a few properties, including Fox News, the Fox Sports national cable channels and the Fox broadcasting network. Those will be spun off into a new company.

"We have long admired what the Murdoch family has built at Twenty-First Century Fox," Comcast CEO Brian Roberts wrote Wednesday in a letter to Fox detailing the proposal.

Fox said it had received the Comcast offer and would carefully review it. Disney had no immediate comment.

Comcast was in talks to buy Fox late last year. But it lost out to Disney in part because major Fox investors weren't sure the proposal would win over government regulators. Around the same time, the Justice Department sued to block the AT&T-Time Warner deal.

Both deals share similarities: AT&T and Comcast are distributors trying to buy content creators.

Comcast re-entered the picture last month when it said publicly that it was preparing a bid for Fox.

Related: War of the media moguls: Is Brian Roberts outflanking Bob Iger?

Roberts is known as a tenacious dealmaker. One of his direct reports, NBCUniversal CEO Steve Burke, told the Los Angeles Times: "Brian never gives up. We have worked on a lot of deals together and he just out-hustles everyone. He's a very persistent guy."

Wednesday's offer is a likely sign that Comcast thinks AT&T's victory might help its chances, and placate the antitrust concerns that Fox had last year.

Roberts wrote in his letter that Comcast is "highly confident" its offer will "obtain all necessary regulatory approvals in a timely manner." He said Comcast's proposal is at least as likely to pass muster with regulators as Disney's.

Comcast has suggested that it would make some concessions if necessary. Like Disney, Comcast is willing to divest Fox's regional sports networks if regulators demand it, according to company filings.

Comcast also agreed to cover the $1.5 billion breakup fee that Fox would owe Disney if it backed out of that deal.

"Our money's where our mouth is," Cavanagh said on the call with investors. "We think this deal gets closed."

Now the ball is in Fox's court. The company's board will need to determine whether Comcast's offer is reasonably likely to be better than Disney's. If they do, they will start negotiating with Comcast.

Should the board decide Comcast has the better deal, Disney would have five days to come up with a counter.