Media executives dreaming of megamergers received a wake-up call this week: The Trump administration isn't the rubber stamp they once thought it would be.

In media circles, the Trump presidency was seen as ­ushering in a new era of consolidation, largely because Republican administrations are thought to be more business-friendly.

Now, Washington is no longer considered a sure thing. In the first major test of its approach to merger reviews in the Trump era, the Justice Department has pushed back against AT&T Inc.'s $85.4 ­billion takeover of Time Warner Inc., throwing the deal into jeopardy.

AT&T had expected the deal would be done by now. "I thought that was a layup," AT&T Chief Executive Randall Stephenson said Thursday at a New York Times conference. He's been seeking the deal to deliver programming from Time Warner, the home of HBO and the Warner Bros. studio, to AT&T's pay-TV users and wireless subscribers, with advertising tailored to their tastes.

The sudden resistance from regulators isn't just a potential setback for the telecom giant. It's a warning shot to other media companies contemplating their own tie-ups.

"The narrative that Democrats will reject anything and Republicans will approve anything can be thrown out the window," said Craig Moffett, an analyst at MoffettNathanson. "It's a reminder that just because Republicans are in charge doesn't mean anything goes at DOJ."

AT&T's battle with antitrust officials escalated this week as the two sides sparred over whether the company should sell assets to get the deal approved. Forcing AT&T to sell off the Time Warner division that includes CNN has come up in talks between the companies and Justice Department officials, according to people familiar with the matter.

The focus on asset sales is a surprise since the Justice Department was said to be discussing conditions to ensure a level playing field for rivals. That was before the new chief antitrust division chief, Makan Delrahim, was confirmed by the Senate and joined the merger's review. He has said he isn't a fan of conditions that force the Justice Department into ongoing monitoring of companies' behavior.

AT&T's Stephenson said this week he won't sell CNN, and is girding for a potential court battle in case the government sues to block the deal.

"If the companies choose to litigate, they have a good chance of winning the battle," said Jennifer Rie, senior litigation analyst at Bloomberg Intelligence. "While the DOJ has been successful in recent M&A court challenges, they have all been mergers of competitors, rather than vertical, like this one."

If the transaction falls apart, other bidders could emerge for Time Warner. Apple, for instance, reportedly approached Time Warner about a possible deal before AT&T agreed to buy it. And 21st Century Fox made an offer for Time ­Warner years ago.

"But we think new bidders could be wary," said Doug Creutz, a media analyst at Cowen & Co. "If the DOJ objects to an AT&T buy, they might equally object to other prospective buyers of significant scale."

Even if AT&T prevails in court, the government's tough stance could have a chilling effect on other deals that would need its approval. Walt Disney, for instance, recently held talks to buy 21st Century Fox's movie studio and other assets. Sprint Corp. and Altice, the cable company, have both considered bids for the cable giant Charter Communications.

Meanwhile, Discovery Communications is awaiting government approval to buy Scripps Networks Interactive, and Sinclair Broadcast Group is seeking clearance to purchase Tribune Media Co.

Trump warned during the campaign that his administration would fight AT&T's tie-up with Time Warner, arguing it would concentrate too much power in one company. His hostile views toward CNN have fueled speculation that he ordered the Justice Department to force the sale of the cable news network as revenge for what he calls its "fake news" reporting. Democrats including Sen. Al Franken of Minnesota and Sen. Brian Schatz of Hawaii have said the Justice Department must demonstrate that it's not acting against the merger for ­political reasons.

The Justice Department said this week it's reviewing the deal on its merits.

The AT&T-Time Warner deal marks Delrahim's first major deal review since he took over the antitrust division in September. He's wasted no time sending a message.

"Before this people were saying anything could go through because Trump would be a rubber stamp," said Jonathan Chaplin, an analyst at New Street Research. "By taking a tough stance on this deal, Delrahim has changed the narrative. He's put the whole world on notice. The message is: 'These guys are taking a hard look at everything.' "