Mobile carrier T-Mobile has completed its takeover of smaller rival Sprint, creating a new wireless giant that rivals AT&T and Verizon in size

NEW YORK (AP) — Mobile carrier T-Mobile has completed the takeover of smaller rival Sprint, creating a new wireless giant that rivals AT&T and Verizon in size.

The companies announced the deal, valued at $31.6 billion based on T-Mobile’s closing stock price Tuesday, two years ago. It has taken a long time to close because of pushback from state and federal regulators.

The Federal Communications Commission and the Department of Justice approved the deal last year, with DOJ telling the companies that they must set up satellite TV company Dish as a new wireless carrier — an unusual arrangement — in order to win approval. Public-interest groups said this was insufficient to correct the harms from the merger.

State attorneys general sued to block the deal, saying it would add billions to consumers’ wireless bills. A federal judge ruled for the companies in February.

T-Mobile says that adding Sprint’s spectrum, the airwaves that carry phone calls and data signals, will boost its network and make its service available to consumers at lower prices. It had promised regulators not to raise prices for three years.

T-Mobile also said Wednesday that its CEO, John Legere, is stepping down a month earlier than expected, handing the job off to COO Mike Sievert. He will remain a board member.

As of Wednesday, Sprint shares are no longer trading. T-Mobile shares added 2.8% to $86.23 in midday trading.