A federal judge has approved T-Mobile's $26.5 billion takeover of Sprint, removing a major obstacle to a shakeup in the wireless industry. After the deal closes, the number of major U.S. wireless companies would shrink from four to three. 

T-Mobile says the deal would benefit consumers as it becomes a fiercer competitor to the larger Verizon and AT&T. 

But a group of state attorneys general tried to block the deal, arguing that having one fewer phone company would cost Americans billions of dollars in higher cellphone bills. 

RELATED: FCC formally approves T-Mobile-Sprint merger

RELATED: T-Mobile-Sprint merger approved by regulators

The judge rejected those claims.

New York's attorney general says an appeal is possible. Though the deal still needs a few more approvals, T-Mobile expects to close it as early as April 1.

In November, the FCC formally approved the merger, saying that it believes the merger "will help close the digital divide and advance United States leadership in 5G, the next generation of wireless connectivity." 

T-Mobile and Sprint announced their deal in April 2018.