The Department of Justice announced Friday that it has reached an agreement on the more than $26 billion merger between T-Mobile and Sprint.

Following the announcement, shares of T-Mobile and Sprint hit new all-time highs of $85.22 and $8.06, respectively. Shares of Dish Network climbed as much as 3.5%.

As part of the agreement, Dish will pay $5 billion for a combination of divested assets including Sprint's Boost Mobile, Virgin Mobile and other prepaid phone businesses, as well as some of Sprint's wireless spectrum. T-Mobile will make at least 20,000 cell sites and hundreds of retail stores available to the company. Dish will also be able to access T-Mobile's network for seven years.

Makan Delrahim, head of the DOJ's antitrust division, said without these remedies, the merger would "substantially harm competition."

"Americans' access to fast, reliable and affordable wireless connectivity is critically important to our economy and to every American consumer and to their way of life," he said at a news conference announcing the agreement.

Delrahim added that the agreement establishes Dish as a "disruptive force in wireless."

T-Mobile and Sprint said they expect regulators will approve the merger in the third quarter and the deal to close in the second half of this year.

Separately, Dish announced it struck an agreement with the Federal Communications Commission to establish a 5G broadband network covering 70% of the U.S. population by June 2023. If it doesn't meet that deadline, it will pay the U.S. Treasury as much as $2.2 billion.

State attorneys general from Nebraska, Kansas, Ohio, Oklahoma and South Dakota have signed onto the agreement. However, T-Mobile and Sprint still face an ongoing lawsuit from 13 state attorneys general and the District of Columbia.

Led by New York and California, the case seeks to block the deal on anti-competitive grounds.

The merger cannot be finalized until after that case is resolved. The trial is set to begin on Oct. 7, but that date could be pushed back until Dec. 9, given the structural changes to the merger announced Friday.

On a call with reporters, New York Attorney General Letitia James declined to comment on whether the trial will be postponed as a result of Friday's announcement.

James added that she's concerned Dish doesn't have the experience to serve as a "viable competitor" in the prepaid wireless industry or to build out a wireless network on its own.

"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," James said in a statement.

A spokesperson for California's attorney general, Xavier Becerra, said, "We're reviewing the announced settlement, but our bottom line remains the same: protect consumers and competition."