A federal judge in New York has approved the merger of the third and fourth largest wireless carriers, T-Mobile (TMUS  ) and Sprint (S  ), that could lead to higher prices for wireless plans.

On Tuesday, a New York federal judge approved the $26.5 billion merger despite fears about the effects such a monopolistically large company will have on the market. For their part, T-Mobile and Sprint both say this deal will benefit consumers. They say merging will expand customers' access to the new 5G networks and improve services overall.

"Today was a huge victory for this merger ... and now we are FINALLY able to focus on the last steps to get this merger done," T-Mobile CEO John Legere said in a statement.

Judge Victor Marrero seems to be something of a fan of T-Mobile, writing in his decision, "T-Mobile has redefined itself over the past decade as a maverick... in its industry to make numerous pro-consumer changes. The proposed merger would allow the merged company to continue T-Mobile's undeniably successful business strategy for the foreseeable future."

Ajit Pai, Chairman of the Federal Communications Commission, has also expressed his appreciation for the work done by the billion dollar wireless company saying it will help the U.S. expand its 5G networks. After banning 5G company Huawei, government officials have been trying to find ways to keep the U.S. in the same league as China concerning 5G networks.

"The T-Mobile-Sprint merger will help close the digital divide and secure United States leadership in 5G. After the merger, T-Mobile has committed to bringing 5G to 97% of our nation's population within three years and 99% of Americans within six years. Its 5G network will also reach deep into rural areas, with 85% of rural Americans covered within three years and 90% covered within six years."

Critics of the merger, on the other hand, claim the union will lead to higher prices.

"Going from four established nationwide wireless networks to only three... will be extremely damaging to competition," says senior policy counsel at Consumer Reports George Slover. "It will degrade the choices available to consumers, the options for network access, and the incentives to create better and more innovative service."

Judge Marrero acknowledged these concerns in his decision but did little to combat them. He wrote that the merger "is not reasonably likely to substantially lessen competition." He explained that Sprint has been "falling farther and farther short of the targets it must hit to remain relevant." He doesn't seem to believe the company will continue to survive as a competitor in the wireless market.

Getting the courts' approval did require some adjustments to the deal. The two wireless companies agreed that Sprint's prepaid customers would be moved to Dish while other customers will go to T-Mobile.

Not every government official approves of this deal. New York Attorney General Letitia James said in a statement that the states are considering an appeal.

"From the start, this merger has been about massive corporate profits over all else, and despite the companies' false claims, this deal will endanger wireless subscribers where it hurts most: their wallets," James said. "There is no doubt that reducing the mobile market from four to three will be bad for consumers, bad for workers, and bad for innovation, which is why the states stepped up and led this lawsuit."