AT&T had hoped to salvage its proposed $39 billion merger with T-Mobile by winning in court against the Justice Department and then using that victory to convince other skeptical regulators.

That strategy, however, was thrown into disarray Friday when a federal judge said she would weigh a Justice Department request to throw out the antitrust case altogether, which could rob the wireless giant of a chance to prove itself in court. The merger fell into serious doubt after the chairman of the Federal Communications Commission expressed opposition last month.

A decision to dismiss or even delay the antitrust case could all but seal the fate of the merger as originally conceived, analysts said. During the hearing, U.S. District Judge Ellen S. Huvelle expressed little sympathy for AT&T and T-Mobile. She said it was “presumptuous” for the wireless giants to think they could “use” an antitrust trial to influence the thinking of FCC regulators.

“We don’t have any confidence that we are spending all this time and effort and taxpayers’ money and that we’re not being spun,” Huvelle said.

An AT&T attorney reiterated the company’s determination to fight for the merger and made clear that this was the strategy for saving its deal.

“We are anxious to bring to the American consumer the benefits of increased wireless network capacity and efficiencies that can only arise from combining the resources of AT&T and T-Mobile USA,” said Wayne Watts, general counsel at AT&T. “We are eager to present our case in court."

In August, the Justice Department sued to block the merger, saying it would lead to higher monthly cellphone bills and less competition in the wireless market. The FCC expressed similar opposition late last month, creating a two-front fight for AT&T.

Last month, AT&T withdrew its application with the FCC, saying it would focus first on its court battle with Justice and then reapply for FCC approval.

But Friday’s developments exposed flaws in that plan.

For one, Justice attorneys asked the judge to dismiss their lawsuit, in essence, forcing the company to deal first with the FCC, which has broader authority to block the deal.

“Since there is no proceeding at the FCC, there is no case,” Justice attorney Joseph Wayland argued, adding that his department would file a motion to withdraw or stay the case Tuesday. The judge said she would decide on the motion Thursday.

AT&T’s strategy did not go over well with Huvelle.

“At this moment, [the Justice Department] does not think you are a serious opponent without an application at the FCC,” she said. “Don’t you understand that this ‘strategy’ has a slight aura of using the court?”

The judge questioned whether she should accommodate AT&T’s request to speed up the trial process. If the merger is not completed by September, AT&T will have to hand over $4 billion worth of cash and other assets to Deutsche Telekom, T-Mobile’s parent.

“The landscape has changed. I have no new assurances that you will proceed with the FCC in a timely manner,” Huvelle said.

Antitrust experts called Justice’s move aggressive and smart for perceiving a hole in AT&T’s strategy and barreling through it.

“The idea they could litigate to victory to a judge and then turn to the FCC based on that decision is a far-fetched strategy in the first place,” said Andy Gavil, an antirust expert at Howard University Law School. “I’ve got to think AT&T knows the deal is dead in its current form, so I wonder what they think their end game is.”

AT&T’s chances for FCC approval may have worsened when it fired off a disparaging response to the agency’s conclusions two weeks ago, escalating tensions with the agency that holds the key to the merger.

Now, it seems, it has almost no one on its side in Washington.

“All in all, a tough day in court for AT&T/T-Mobile,” Stifel Nicolaus analyst Christopher King said in a research note. “If the trial is put off, it would be a serious blow to AT&T and T-Mobile’s chances for turning things around in the face of opposition from the DOJ and resistance from the FCC, which in turn could put more pressure on T-Mobile to seek to walk away from the deal.”