AT&T’s gargantuan media play to buy Time Warner looks like a smart strategic move given the way that the current entertainment and communications ecosystem is evolving. The bigger questions for the deal are financial and regulatory.

Can AT&T afford to spend $80 to $90 billion to buy out Time Warner’s stockholders and another $22 billion to assume Time Warner’s net outstanding debt? And will regulators allow it?

AT&T has barely finished digesting its $49 billion DirecTV purchase from last year, but numerous reports say the carrier is on the verge of acquiring Time Warner, owner of the Warner Brother movie studio as well as popular cable channels like TNT, CNN and HBO. Although some analyses of the deal have found the strategic rationale lacking, the combination of AT&T’s wired and wireless network distribution platform and Time Warner’s entertainment asset are a good match.

Get Data Sheet, Fortune‘s technology newsletter.

AT&T’s existing network platform faces several threats. One is that wireless customers could defect to competitors like Verizon and T-Mobile, or, starting next year, even to Comcast.

Other threats are on the TV side. AT&T’s U-verse cable TV offering and its DirecTV satellite TV service have more than 25 million subscribers combined. That makes AT&T the largest pay TV provider in the country, which also puts the company the most at risk from cord cutting, cord shaving and other cleverly-labeled phenomenon that all add up to customers dropping a cable or satellite subscription.

And being the biggest TV service also means AT&T has the most at risk from rapidly rising costs to license all the cable channels, sporting events and other programming customers want to watch.

The Time Warner deal helps address all of those threats.

Bolstering the Network

On the wireless side, regulators are allowing carriers to give preferences to content they own, despite net neutrality rules that were seemingly meant to prohibit that practice. The carriers would dispute that characterization but the bottom line is that the preferential treatment gives customers a reason not to defect. Verizon customers will find that watching Verizon’s own video services like its NFL package or Go90 app don’t count against their monthly data allowance. And AT&T is allowing its customers to watch video from DirecTV apps without counting against data caps.

Cable TV providers have their own twist on preferential treatment. They have imposed data caps on Internet service that could limit a customer’s ability to watch as much Netflix or Hulu as desired (though the caps are high enough that such problems are probably a few years off). Obviously any video watched via a cable TV channel won’t count against the caps but also owned online video services may be exempted as well.

Bundling has long been a powerful way to keep customers loyal and it’s a savvy move for carriers to combine video and wireless, as long as regulators allow it.

On the TV side, owning content can help in several ways. If a cord cutting customer drops AT&T’s cable service and starts subscribing to Internet video services, they are likely to be paying for some Time Warner twx content. It could be via the licensing fee Netflix pays the Warner Brothers studio for movies or, more directly, by signing up for Time Warner subsidiary HBO’s own $15-per-month online video service, HBO Now. That’s without even getting into AT&T’s upcoming online video service, which could now get the best-possible terms for Time Warner’s channels.

And, as noted above in the wireless discussion, a customer who drops cable may be more likely to keep Internet and wireless service through AT&T t if the carrier is giving a data-free deal on video content, as it already does for DirecTV, for example.

Owning content also acts as a hedge against rising programming costs. AT&T paid over $9 billion in the first half of 2016 for broadcast, programming and operations, which covered providing for both DirecTV and U-Verse customers. That’s versus revenue for the entertainment unit of just $11.4 billion. It’s hard to tell how much programming costs increased over the past year or two, because AT&T didn’t own DirecTV until 2015. But other pay TV providers like Comcast cmcsa and Charter Communications chtr have indicated that programming costs are rising 8% to 10% a year. Those rising costs could eliminate the entire profit margin of the pay TV industry by 2023 if current trends continue, according to a study by Bernstein Research analysts in April.

Now, the pay TV industry has multiple strategies to fight back against content creators. They have consolidated and bulked up, just like AT&T has, to gain bigger bargaining power in programming fee negotiations. In some cases, they’ve even sued to lower fees and they have lobbied regulators to get more involved in limiting price increases. Or it may even be that the market will adjust on its own.

But by owning content that’s sold to many pay TV services, AT&T could offset its own rising costs by bringing in more revenue on the Time Warner side. That’s exactly one of the primary benefits to Comcast owning NBC Universal. In the first half of the year, Comcast spent $5.8 billion on programming for its cable TV customers, up 8% from 2015. But NBC Universal’s revenue from its cable networks and produced TV shows increased 4% to $9.2 billion. The more volatile movie studio revenue declined 26% to $2.7 billion, as it lacked big hits like 2015’s Furious 7 and Jurassic World. That year, revenue from films jumped 47%. The volatility shows that owning content can be an effective, if imperfect, hedge.

The big risk, however, is that AT&T and Comcast have overreacted to rising programming costs. Some analysts think continued cord cutting and the general preference of younger viewers for non-traditional content like Youtube and Snapchat stories will hurt the value of entertainment conglomerates like Time Warner, NBC Universal and Disney. If that happens, AT&T will have made precisely the wrong bet and could rapidly find itself in financial difficulty.

Financing Questions

Which brings us to the financial calculus, where the rumored deal looks much dicier. After buying DirecTV, AT&T has $10 billion of debt due within one year and another $117 billion of long term debt against just $7 billion of cash. It is just hanging on to its investment grade bond rating.

Though exact terms of the Time Warner acquisition obviously haven’t been announced yet, analysts expect AT&T will use a mixture of stock and debt to pay for the deal. The more debt AT&T uses, the less new stock it has to issue and the easier it will be for the deal to quickly add to AT&T’s earnings per share. But more debt could prompt a ratings downgrade to junk levels, raising the cost of borrowing, not to mention making the whole enterprise riskier if programming revenue does surprisingly start to fall.

In a model produced by New Street Research analyst Jonathan Chaplin on Friday, AT&T might pay $110 a share for Time Warner, with a split of 56% in new stock and 44% in cash raised from borrowing. Including assuming Time Warner’s net debt, the total deal value would be almost $110 billion. Under those assumptions and assuming only modest costs savings, or “synergies” in Wall Street speak, the deal could boost AT&T’s earnings per share by about 4% within three years, Chaplin concluded. But AT&T would also be carrying about $180 billion of debt.

Chaplin doesn’t think the deal makes financial sense at that price because it’s just the use of debt financing that leads to the earnings benefits, or accretion. “We think the deal is value destructive to AT&T shareholders,” he wrote. “Synergies won’t cover the premium they are paying for (Time Warner); the accretion all comes from higher leverage.” For what it’s worth, Chaplin doesn’t buy the strategic rationale, either.

Finally, AT&T will have wasted vast resources and attention from senior management if it agrees to a deal that regulators ultimately don’t allow. Under the Obama administration, antitrust regulators have shot down AT&T and Sprint’s pursuit of T-Mobile. And they blocked Comcast from buying Time Warner Cable. They did allow Comcast to buy NBC Universal and Charter to purchase Time Warner Cable.

An unlikely Trump administration would not allow the deal, according to what Donald Trump said on Saturday. Hillary Clinton hasn’t addressed the deal yet, but she has previously promised to crack down on corporate mega-mergers. So the political climate seems to be shifting against the deal.

Almost two decades ago, AT&T bet big on cable TV with a $100 billion spending spree. But when the Internet bubble popped, competitor WorldCom was engulfed in fraud, and the capital markets shut off the spigot for telecom deals simultaneously, AT&T had to dump the cable assets for half what it paid.

Hopefully, AT&T’s Time Warner deal won’t have to face such a trio of terribles. But the highly-leveraged bet on content still may not pay off given the high price and regulatory risks.