New York (CNN Business) The $26 billion merger between T-Mobile and Sprint has been approved, ending a years-long attempt to combine the United States' third- and fourth-largest wireless carriers.

A federal judge ruled Tuesday in favor of allowing the two telecom giants to combine, a decision that is expected to dramatically change the landscape of the United States wireless market. US District Court Judge Victor Marrero said in his ruling that he didn't envision the companies "would pursue anticompetitive behavior" and rejected the lawsuit brought by thirteen US states and the District of Columbia that sought to block the deal.

The merger will create three similarly sized competitors in the wireless business: the "New" T-Mobile,and(CNN parent company WarnerMedia is owned by AT&T). Satellite company Dish Network plans to use the deal as a catalyst to become a new wireless services provider.

The judge said that Sprint on its own likely couldn't "continue operating as a strong nationwide competitor." Sprint is currently in fourth place, but the company has been rapidly losing customers and claimed its path to deploying a nationwide 5G network without T-Mobile was uncertain. Marrero added that he believes Dish will enter the market and provide significant competition to fill the gap left by Sprint.

States' attorneys general argued that approving the merger would make wireless service and prices worse for Americans. But Marrero said he was ultimately unpersuaded by the states' economic theories and analytical modeling, writing that the two sides' claims ultimately came down to competing crystal balls. He said he was relying substantially on his own "skills and frontline experience" to reach a decision.

"How the future manifests itself and brings to pass what it holds is a multifaceted phenomenon that is not necessarily guided by theoretical forces or mathematical models," he wrote.

Sprint's stock shot up a stunning 70% at the open. T-Mobile shares also spiked 12% early trading Tuesday.

T-Mobile CEO John Legere called the ruling a "huge victory" and said in a statement that the new company, which will retain the T-Mobile name, is "great for consumers and great for competition."

During the two week trial, Sprint and T-Mobile testified that combining would "supercharge" T-Mobile's Uncarrier strategy that has led to such perks for consumers as the end of wireless contracts, and would allow them to more quickly roll out superfast nationwide 5G, the crucial next generation wireless network.

On Tuesday, the companies touted other benefits of the merger, including new jobs. They said the combination will ultimately employ 11,000 more full-time people than the standalone companies would have over the next four years. They said an additional 12,000 jobs will be created to staff 600 new stores and five new "customer experience centers."

The merger could be finalized in early April. A new website has been started to promote the combined companies at NewTMobile.com

Dish Network DISH To alleviate antitrust concerns, Sprint and T-Mobile struck a deal with, which plans to buy some wireless assets from the companies to create a new nationwide carrier. The companies hoped that would remedy the merger's effects on the market. They also promised not to raise prices for the first three years following the combination.

Sprint S T-Mobile TMUS The merger saga between T-Mobile and Sprint has been ongoing since April 2018 when the current deal was proposed. Federal regulators, including the US Department of Justice and the Federal Communications Commission, already approved the merger last year. The states were the final hurdle, andandbattled for the deal's approval in a Manhattan federal court in December.

Both the FCC and the DOJ lauded the judge's decision. Justice Department antitrust chief Makan Delrahim said in a statement he was glad the judge agreed with the DOJ's decision to prop up Dish Network as a fourth wireless competitor.

FCC chairman Ajit Pai also said he was "pleased" with the decision, citing the companies' promise to expand 5G.

"This transaction represents a unique opportunity to speed up the deployment of 5G throughout the United States, put critical mid-band spectrum to more productive use, and bring much faster mobile broadband to rural American," Pai said in a statement. "This is a big win for American consumers."

Lingering concerns

The two attorneys general who led the states' fight against the merger were not pleased with the decision.

Letitia James, the AG from New York, said in statement the reduced competition is "bad for consumers, bad for workers, and bad for innovation." She added that the states will will examine a possible appeal.

California's AG Xavier Becerra said he is "prepared to fight as long as necessary to protect innovation and competitive costs."

The Communications Workers of America said in a statement Tuesday that the merger could put 30,000 jobs at risk.

"Throughout this process, regulators who are supposed to be protecting the public interest have ignored clear evidence that this merger would result in significant job loss for wireless workers," CWA president Chris Shelton said in the statement, adding that T-Mobile workers should be allowed to unionize if the merger is completed.

For consumers, the deal is likely to generate promotions and competitive offers from all three wireless giants in the short term, Forrester principal analyst Frank Gillett said in an emailed comment. But whether consumers are positively or negatively impacted in the long run will depend on Dish's ability to enter the market.

"The long-term question of whether there is sufficient competition for wireless service is up for debate," Gillett said."The answer will come from Dish Network and its CEO — if they follow through on promises to invest in a 5G network and become fully competitive over the next seven years, then there will still be four major options."

Dish has wanted to enter the wireless market for a decade, spending around $12 billion on wireless spectrum and promising the FCC that it will have a nationwide 5G network by 2023.

But there are big hurdles for Dish: it currently does not have its own network and would start out serving its own cell phone customers on T-Mobile's network infrastructure. It will also inherit only prepaid subscribers from Sprint as part of the merger deal, a type of customer generally considered less essential to wireless companies.

Dish CEO Charlie Ergen argued during the trial that his company is up to the task.

"This isn't some fantasy for us," Ergen testified. "We've wanted to get into this wireless business for the past 10 years. I've worked on it darn near every day. Now, the stars have aligned to allow us to do this and we know we can compete."

-- CNN's Brian Fung contributed to this report