A bigger-is-better mentality has swept the tech and media industries over the past 18 months, as companies have spent $200 billion on a series of megamergers that have reshaped the American business landscape.

The Trump administration has mostly been a cheerleader for the corporate supersizing. And on Tuesday a federal judge ruled in favor of T-Mobile’s planned takeover of Sprint.

The long-in-the-works merger would combine the nation’s third- and fourth-largest wireless carriers, creating a telecommunications giant to take on AT&T and Verizon. The new company, to be called T-Mobile, would have about 100 million customers.

The deal has come about as digital technology has woven itself into the fabric of daily life, changing how people use their phones and forcing wireless carriers, television networks and movie studios to move away from the analog systems that once dominated the entertainment and communications industries.

In the ruling on Tuesday, Judge Victor Marrero of United States District Court in Manhattan rejected an unorthodox challenge to the deal led by attorneys general from 13 states and the District of Columbia.

The suit was brought in June after regulators at the Department of Justice and the Federal Communications Commission approved the merger plan. The states argued that the combination of T-Mobile and Sprint would reduce competition, lead to higher cellphone bills and place a financial burden on lower-income customers.

Their arguments did not sway the judge. He praised T-Mobile in his ruling, calling it “a maverick that has spurred the two largest players in its industry to make numerous pro-consumer changes” and describing its business strategy as “undeniably successful.”

The merger, which T-Mobile and Sprint hope to close by April 1, would be the latest in a wave of corporate deals. In June 2018, AT&T’s bid to buy Time Warner was approved, giving the phone giant control of CNN, HBO, and the Warner Bros. film and TV studios. Shortly afterward, the Walt Disney Company beat out Comcast to buy the majority of Rupert Murdoch’s 21st Century Fox empire. Late last year, Shari Redstone combined her family’s two businesses, CBS and Viacom.

The new T-Mobile would be a formidable rival to AT&T and Verizon, the two largest wireless carriers in the country.

“Today was a huge victory for this merger,” John Legere, the chief executive of T-Mobile, said in a statement on Tuesday.

Known for his exuberant and often pugnacious leadership style, Mr. Legere made use of the court decision to take aim at AT&T and Verizon, using a special sobriquet for each: “Look out, Dumb and Dumber and Big Cable — we are coming for you … and you haven’t seen anything yet!”

Marcelo Claure, the executive chairman of Sprint, said the court decision “validates our view that this merger is in the best interests of the U.S. economy and American consumers.”

Letitia James, the New York attorney general and a key plaintiff in the case, warned on Tuesday that the deal would harm consumers.

Ms. James, who has argued that the merger would cost subscribers at least $4.5 billion annually, called the ruling “a loss for every American who relies on their cellphone for work, to care for a family member and to communicate with friends.” She added that the deal was always about “massive corporate profits over all else.”

T-Mobile and Sprint have said they do not plan to raise prices for at least three years.

Ms. James left open the possibility of an appeal, adding that her office “will continue to fight the kind of consumer-harming megamergers.”

One potential snag remains: The California Public Utilities Commission, which governs telecommunications services in the state, has yet to sign off on the merger plan. Consumer groups in California have argued that T-Mobile’s pledge to deliver faster service at affordable prices is unrealistic.

The commission is likely to issue a provisional decision within a few weeks and make a final call after a 30-day comment period. It could block the move, but a more likely outcome, based on recent rulings, would be for it to allow the companies to combine if they agreed to certain conditions. Those could include worker protections, price freezes and service guarantees for California residents.

The Communications Workers of America, a labor group, warned that the merger would put 30,000 jobs at risk. Regulators have “ignored clear evidence that this merger would result in significant job loss for wireless workers,” Chris Shelton, the president of the organization, said in a statement on Tuesday. He added that T-Mobile workers “have become more determined than ever to join together and win union representation.”

If the merger goes through, the majority of Sprint customers would end up having T-Mobile plans. Customers of Sprint’s prepaid brands, including Boost Mobile, Virgin Mobile and Sprint prepaid, would become customers of Dish Network, a satellite TV company that has plans to move into telecommunications.

The original merger terms called for T-Mobile, the larger of the two companies, to effectively buy Sprint in an all-stock transaction that was earlier valued at $26.5 billion. Because of the lawsuit, the original deadline to complete the deal has passed, and T-Mobile has pushed to renegotiate the terms.

Both companies have portrayed the merger as crucial to their futures in an industry challenged by pricing wars that have undercut profits and stalled growth. By combining with Sprint, T-Mobile has said, it would be able to accelerate its development of 5G, the next generation of cellular networks.

AT&T and Verizon have also hailed the development of their own 5G networks, which bring faster-than-broadband speeds through the air. 5G is not a set technology standard, and each company offers its own version of the service.

The planned merger is also important to Sprint, which has bled cash and subscribers in recent years. SoftBank, the Japanese conglomerate that controls the company, has been looking to raise cash for its newest tech investing fund.

The new T-Mobile would be led by Mike Sievert, the T-Mobile chief operating officer who is set to take over from Mr. Legere, the face of the company since 2012. Mr. Legere has said he will leave the company after his contract expires in April.

“Now we’re laser-focused on finishing the few open items that remain, but our eye is on the prize: finally bringing this long-awaited merger and all the goodness it will deliver,” Mr. Sievert said in the statement.

Mr. Legere and his Sprint counterpart, Mr. Claure, were once rivals whose companies needled each other in advertising campaigns and social-media posts. All was forgotten by April 2018, when the companies announced their intention to join forces.

The two executives made personal appeals to officials in Washington as they worked to secure approval for the merger. To get the nod from the government, T-Mobile and Sprint agreed to sell off significant portions of their businesses to Dish Network.

Mr. Legere made numerous visits to the F.C.C. and the Justice Department, and Mr. Claure was a host of a fund-raiser for Representative Marsha Blackburn, a Tennessee Republican who is now a senator. Several lawmakers expressed misgivings over Mr. Legere’s Washington visits, noting the dozens of times that he and other T-Mobile executives stayed at the Trump International Hotel. The companies have denied doing anything inappropriate.

Another key figure who stands to benefit from the deal is Masayoshi Son, the outspoken chairman of SoftBank. Mr. Son has been trying to offload the wireless carrier, a debt-laden business, for years.

In December 2016, Mr. Son met with Donald J. Trump, who was then the president-elect, at Trump Tower and pledged to invest some $50 billion in the United States in an initiative that would create 50,000 jobs.

Recently, Mr. Son has come under pressure from the activist investor Elliott Management. SoftBank’s investments in start-ups, including WeWork, have failed to deliver on some efforts, and Mr. Son has struggled to raise more cash for a new investment fund. Other investments, including SoftBank’s bet on Uber, have been successful.

By the close of trading on Tuesday, Sprint shares jumped more than 77 percent, while T-Mobile shares rose more than 11 percent.

Let’s block ads! (Why?)