T-Mobile CEO John Legere and Marcelo Claure, chairman of the Sprint Corp., at a House Judiciary Subcommittee hearing.

On Tuesday a federal judge approved the merger of T-Mobile and Sprint, rejecting claims from more than a dozen states and consumer advocates that the union would hurt competition and ultimately lead to higher prices.

The decision by Judge Victor Marrero of the U.S. District Court for the Southern District of New York removes the last big hurdle for the $26 billion deal, originally proposed more than a year ago. The Federal Communications Commission and antitrust officials at the Department of Justice have already signed off.

Thirteen states and Washington, D.C. filed suit last year to stop the deal from going through, calling it anti-consumer.

In his ruling, Marrero said that over the past 10 years T-Mobile had redefined itself as a “maverick that has spurred the two largest players in its industry to make pro-consumer changes.” The combination of the two companies, he added, should allow that to continue for the long term. 

On the flip side, Marrero noted that Sprint, which has struggled to compete against the larger AT&T and Verizon, was “falling farther and farther short of the targets it must hit to remain relevant as a significant competitor.”

But New York Attorney General Letitia James, who led the multistate effort to fight the merger, said the decision “marks a loss” for every American who relies on a wireless phone in day-to-day life. She added that the states were reviewing their options, including a possible appeal.

More on Smartphones & Wireless Carriers

“From the start, this merger has been about massive corporate profits over all else,” James said in a statement. “And despite the companies’ false claims, this deal will endanger wireless subscribers where it hurts most: their wallets.”

Her thoughts were echoed by George Slover, senior policy counsel at Consumer Reports.

"From the moment this merger was announced, it was clear that it went against what is needed to give consumers the benefits of competition,” Slover said. “This merger should never have made it out of the corporate boardroom.” 

T-Mobile and Sprint have long argued that the merger was needed if the two companies hoped to compete against Verizon and AT&T. Even combined, the pair will place a distant third in terms of the number of subscribers.

Officials for T-Mobile and Sprint cheered the decision, saying that while there are some loose ends to tie up, including perhaps more litigation, the deal could close as early as April 1.

“We’ve said it all along: The new T-Mobile will be a supercharged un-carrier that is great for consumers and great for competition,” T-Mobile's CEO, John Legere, said in a statement.

Like the other major carriers, T-Mobile has been slowly expanding its 5G network. In December it flipped the switch on what it called the first nationwide 5G network, though it still leaves vast sections of the U.S. without coverage.

According to telecommunications experts, 5G speeds—five times faster than 4G connections at peak performance—will pave the way for the instantaneous response times required to safely perform robotic surgery and operate self-driving cars that communicate with other vehicles and road infrastructure. The technology will also allow consumers to download a movie in just 5 seconds.

By combining forces with Sprint, T-Mobile says it will be able to “supercharge” its 5G coverage, with the hope of boosting capacity within a few years to 14 times what it would be on its own. As part of the merger deal, the company has pledged to cover 97 percent of Americans with its network within three years and 99 percent of Americans within six.

And if the companies don’t make good on those promises within that six-year time frame, they’ll be required to make payments that could exceed $2 billion, according to the FCC.

T-Mobile is pledging not to raise prices or charge extra for 5G service for at least five years. And the companies plan to sell, as outlined in an earlier agreement, Sprint’s prepaid division, Boost Mobile, to Dish Network, effectively creating a fourth carrier.

But Slover said that’s not enough to offset the loss of an established fourth carrier.

“Even under the best of very uncertain circumstances, Dish won't fill the gap left by Sprint's exit for years, if ever,” he added.