The $26 billion T-Mobile-Sprint merger cleared its last major regulatory hurdle Friday when the Justice Department approved the combination with some provisions, including the sale of Sprint's Boost Mobile prepaid carrier to Dish Network.

The new T-Mobile-Sprint company must also sell Virgin Mobile and Sprint prepaid services to Dish, as well as some additional spectrum. T-Mobile and Sprint must provide Dish the cell sites needed to run its wireless service for seven years, while Dish builds its own 5G network, according to the agreement.

Those steps ensure “large amounts of currently unused or underused spectrum are made available to American consumers in the form of high-quality 5G networks,” Assistant Attorney General Makan Delrahim said in a statement Friday.

Facebook pressure:Social network co-founder Chris Hughes reportedly working with FTC on Facebook breakup

Merger musings:Should Apple buy Netflix?

The DOJ's approval is the last major step for the merging of the nation's No. 3 and No. 4 wireless carriers. Although the Federal Communications Commission needs to approve it, too, FCC chairman Ajit Pai gave his blessing to the corporate marriage two months ago.

After the DOJ's announcement Friday, Pai said he would recommend the commission approve the merger.

“The commitments made to the FCC by T-Mobile and Sprint to deploy a 5G network that would cover 99% of the American people, along with the measures outlined in the Department’s consent decree, will advance U.S. leadership in 5G and protect competition," he said. Pai noted bipartisan support for the merger from Governor Laura Kelly (D-KS), Rep. Anna Eshoo (D-CA), and former FCC Commissioner Mignon Clyburn.

T-Mobile CEO John Legere celebrated the agreement on Twitter saying: "We are one step closer to bringing New T-Mobile to American consumers!"

During a teleconference with investors, Legere said he expected the deal to close by the end of the year.

Dish Network said it planned to deploy a 5G broadband network to 70% of the U.S. population by June 2023. The deal will "will set the stage for our entry as the nation's fourth facilities-based wireless competitor and accelerate our work to launch the country's first standalone 5G broadband network," said DISH co-founder and chairman Charlie Ergen.

In afternoon trading, T-Mobile shares were up 6% and Sprint shares were up 7.5%, while Dish stock rose 1.6%

T-Mobile-Sprint merger:Will you pay more for your cellular plan?

But not all agree on the regulators' decision. Democratic presidential candidate and Massachusetts senator Elizabeth Warren, who has called for a breakup of big tech firms, tweeted that the merger "will cost thousands of jobs, reduce wages, and further reduce competition in a sector that badly needs it."

"The administration thinks it’s OK for two of the four major cell phone cos. to combine This is a bad deal – it means less competition & more costs," tweeted Sen. Amy Klobuchar, a Minnesota Democrat who is also running for president and a member of the Senate Commerce Committee. "T-Mobile can’t compete for you for cheaper service against Sprint when they are the same company!"

FCC Commissioner Jessica Rosenworcel, a Democrat, tweeted that she "remained skeptical that this combination is good for consumers, good for competition, or good for the economy."

Fourteen states including California and New York have sought to block the merger on the grounds its unnecessary consolidation curbs competition. A status hearing on that case is scheduled for Thursday in the Southern District of New York, but the states are asking for a delay from the previously agreed upon Oct. 7 trial date due to changes in the merger, including DOJ provisions.

The DOJ said five states – Nebraska, Kansas, Ohio, Oklahoma, and South Dakota – had agreed with the agency on its merger provisions. Those states are not part of the other states' legal challenge.

“A marketplace with fewer active competitors drives up costs, reduces consumer choice and thwarts innovation," said California Attorney General Xavier Becerra. "We intend to be prepared to go to trial to fight for a fair, competitive, and equitable marketplace for consumers nationwide.”

Added New York Attorney General Letitia James: “We have serious concerns that cobbling together this new fourth mobile player, with the government picking winners and losers, will not address the merger’s harm to consumers, workers, and innovation."

At advocacy group Free Press, research director Derek Turner said the states have come to the same conclusion that the DOJ's staff did previously: "This merger is bad for wireless users and can’t be fixed," he said.

“By signing off on this merger, the Justice Department has done nothing to remedy the short- and long-term harms the loss of an independent Sprint will create for U.S. wireless users. Nothing about these divestitures would lower prices for customers," he said. "DISH can’t mount a retail operation that’s even close to what Sprint currently offers."

Facebook-FTC:Despite $5B fine for privacy violations, social network may not seem different for users

Facebook, Google, Amazon, Apple:Is Big Tech headed for a big breakup?

Follow USA TODAY reporter Mike Snider on Twitter: @MikeSnider.