A smartphones with Sprint logo are seen in front of a screen projection of T-mobile logo, in this picture illustration taken April 30, 2018. REUTERS/Dado Ruvic/Illustration

WASHINGTON (Reuters) - T-Mobile US Inc and Sprint Corp won a federal court fight as a judge ruled on Tuesday that their $26 billion merger was legal and should be allowed.

In his ruling, Judge Victor Marrero disagreed with a group of state attorneys general who had argued that a merger of the No. 3 and No. 4 U.S. wireless companies should be prohibited because it would lead to higher prices for consumers.