After a years-long slog, wireless telecom T-Mobile (NASDAQ:TMUS) is one big step closer to being allowed to merge with rival Sprint (NYSE:S) to form a service provider that can better compete with industry giants AT&T and Verizon. U.S. District Court Judge Victor Marrero on Tuesday ruled against a group of state attorneys general, who argued that the deal would reduce competition and potentially increase prices for consumers.

Graphic of rising arrow being pushed together by two businessmen.

Image Source: Getty Images.

The proposed merger has been in play since 2014, but has been stymied multiple times for reasons including regulatory roadblocks and disagreements about what the combined company would look like. 

Those efforts ultimately proved fruitful, however. The Department of Justice approved the pairing, with certain conditions, in July of last year. The FCC gave the two companies its green light in November, but also imposed conditions that dovetailed with the DOJ's stipulations. Namely, the two agencies have mandated that Sprint's Boost Mobile service and other prepaid service businesses be sold to satellite TV company Dish Network (NASDAQ:DISH) and that Dish must be allowed to access enough of T-Mobile's network that it has a viable chance of becoming a major wireless provider in its own right.

The court case was the last of the major legal hurdles the two companies needed to clear, although minor ones remain. The California Public Utilities Commission must also approve the deal before any merger can be finalized, and another federal judge must approve Dish's new role using Sprint's and T-Mobile's assets. Neither of those are viewed as likely impediments.

The deal values Sprint at around $26.5 billion, to be paid entirely with T-Mobile stock.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.