The Justice Department on Friday approved the merger of T-Mobile and Sprint, the third- and fourth-largest wireless companies in the United States, saying its antitrust concerns had been addressed and giving its blessing to a deal that would reshape the nation’s wireless industry.

Critics of the merger have said it would reduce competition by lowering the number of wireless carriers from four to three, resulting in higher cellphone bills. On Friday, those critics, a group that includes attorneys general from several states and Democratic presidential candidates, continued to voice their objections to the deal, saying the combination would harm consumers.

Until recently, the Justice Department shared those concerns. In a news briefing on Friday, Makan Delrahim, the Trump administration’s top antitrust regulator, said the agency had only decided to approve the deal after T-Mobile and Sprint agreed last week to sell off significant portions of their businesses to the pay-television operator Dish Network as part of a plan to create a potential new major wireless company. Under the agreement’s terms, Mr. Delrahim said, “Dish is in a unique position to succeed.”

The merger deal’s terms call for T-Mobile, the larger of the two companies, to effectively buy Sprint in an all-stock transaction valued at $26.5 billion. The combined company, to be called T-Mobile and led by T-Mobile’s chief executive, John Legere, would be a formidable rival to AT&T, the largest wireless carrier in the country, and Verizon, the second-largest.