AT&T chief executive Randall Stephenson is expected to testify in federal court this week to defend his company's historic merger with Time Warner, a deal that antitrust regulators have said is illegal and anticompetitive.

For the 57-year-old Oklahoma native, the testimony marks a pivotal moment in his roughly decade-long stewardship of the telecom giant — and the climax of a longtime acquisition strategy.

At $85 billion, the Time Warner deal is the biggest of Stephenson's career at the helm of AT&T. It could transform the company into a media and entertainment titan, one that controls CNN, HBO, TBS, TNT and a slew of popular franchises such as DC Comics and the "Harry Potter" film series.

It's a combination, Stephenson has said, that will open a new chapter in the company's history by reshaping it into a powerhouse in digital advertising on par with Google and Facebook.

"What we're trying to do is build a platform that gives us an opportunity to compete with those guys," Stephenson told investors and analysts at a conference last year.

(The company didn't immediately respond to a request for comment.)

Government opposition has put the proposed merger in legal jeopardy, with the fate of the deal resting in the hands of a federal judge in Washington. As he takes the stand, Stephenson will try to persuade the court that the deal will be good for consumers, leading to more innovative services and more competition against the tech industry. But whatever the trial's outcome, analysts say, it will be certain to shape Stephenson's legacy.

"For him personally, this is a very important deal," said Paul Gallant, an industry analyst at Cowen & Co. "AT&T is a company that’s built on [mergers and acquisitions]."

In that respect, Stephenson is following in the footsteps of his predecessors.

It was Stephenson's former boss, Ed Whitacre, who spearheaded the 2005 merger that created the modern AT&T. At the time, Whitacre led SBC Communications, one of the seven "Baby Bells" created when the Justice Department broke up AT&T's telephone monopoly in 1984. A provider of local phone service, SBC itself had become a giant by the mid-2000s, having already gobbled up two other Baby Bells before setting its sights on what was left of AT&T. By that time, AT&T was limited to providing long-distance phone service.

By taking control of AT&T and its brand for $16 billion, SBC created an integrated telecom company with power both in local phone markets and in long-distance service. It gave the combined company — now AT&T Inc. — a springboard from which to launch a major bid in wireless services.

Now Stephenson intends to use that mature wireless platform as a way for AT&T to evolve again, this time as a provider of Internet content. His attempt to purchase Time Warner today could prove as groundbreaking as the SBC-AT&T deal, according to Gallant.

Stephenson's record on big acquisitions so far has been mixed. His first major deal as chief executive proved unsuccessful. In 2011, AT&T tried to purchase T-Mobile, then the nation's fourth-largest cellphone carrier. Regulators opposed the $39 billion deal because the consolidation allegedly would have harmed competition by eliminating a major competitor. That competitor would go on to validate the government's theory by launching an "Uncarrier" campaign to transform the wireless business — driving down prices, putting an end to long-term contracts and early-termination fees, and forcing an industry-wide shift to unlimited data plans.

Stephenson's next attempt was more fruitful. AT&T bought DirecTV in 2015 for $49 billion, giving the company control over the satellite TV service's 20 million customers. The deal anointed AT&T as the country's biggest pay-TV provider, leapfrogging Comcast.

But Stephenson's latest effort could be thwarted should Judge Richard Leon block the deal — an unlikely but real possibility, said Rich Greenfield, an industry analyst at the research firm BTIG.

"Anything can happen, and that's the unknown wild card," he said. "It’s one human making a decision."

With the addition of Time Warner's content, AT&T would closely resemble Comcast as a company that controls valuable programming as well as the pipes to distribute it. But AT&T's footprint would be even larger than Comcast's, because its DirecTV satellite product reaches homes nationwide, whereas Comcast's footprint is geographically limited by where its cables run.

"You could imagine it being like the culmination of a career for Randall Stephenson, being able to create an empire that looks like [Comcast chief executive] Brian Roberts' empire," said Geoffrey Manne, an antitrust expert at the International Center for Law and Economics.

Whether Stephenson can turn that future into a reality depends — at least in part — on his performance in court.