The legal mess engulfing T-Mobile’s $26 billion deal to buy Sprint looks more complicated than ever, but experts say the upshot is starting to look simple: the merger is in major trouble.

New York Attorney General Letitia James on Tuesday, along with eight other states and the District of Columbia, sued to block the mega-merger between the wireless carriers, arguing that a deal would mean higher prices for consumers.

Glenn Pomerantz, lead counsel for the state attorneys general, asked federal Judge Victor Marrero of the Southern District of New York to approve a temporary restraining order, or TRO, to block the controversial merger.

Marrero, a Clinton appointee, is expected by most insiders to approve the TRO — an order that would effectively postpone the deal for at least six months, a source close to the merging parties said.

“It’s all about the TRO,” the source said.

“The Southern District of New York has a pretty liberal standard for issuing a TRO,” a former Federal Trade Commission policy analyst who has read the states’ complaint against the merger said. “It’s one of the best places to bring a case.”

“What they did in their complaint climbs the mountain and shows a significant likelihood of success” meeting the standards of what is needed to gain a TRO, the policy analyst believes.

The states’ suit presents a daunting hurdle for the Department of Justice, which appeared on the verge of approving the merger in the coming weeks, according to insiders. The DOJ has no power to head off the TRO, an attorney close to the merging parties said.

David Scharf, a partner at law firm Morrison Cohen who is not involved in the case, said he believes the T-Mobile merger suit will likely result in a high-profile case that gets an appeal.

“This is states’ rights versus federalism,” as the FCC and DOJ are expected to support the merger, according to Scharf. “This could end up in the Supreme Court.”

Meanwhile, it was reported Wednesday that T-Mobile was speaking to Dish, Charter and Altice about selling one of them enough spectrum so they can form a fourth wireless network. That news sent Sprint’s shares rising just under 1%, to $6.63, at the close.

But even if T-Mobile manages to sell the spectrum in frenzied negotiations in the coming days, that new concession to get the merger approved still may not be enough to stop the TRO.

Dish, for example, which owns valuable unused spectrum itself, would need at least three years to build the towers, get the equipment and arrange the leases to launch a competitive fourth wireless network, the source close to the merging parties said.

Charter and Altice would have similar issues, according to experts, and consumers could be hurt by the time a new competitor could launch its network.