The Federal Communications Commission approved T-Mobile’s merger with Sprint on Wednesday, formalizing a commitment that Chair Ajit Pai made back in May.

The vote — coupled with the Justice Department’s approval earlier this year — gives the companies the green light from Washington D.C. but it isn’t the final obstacle on their path to combining.

T-Mobile and Sprint still face a multi-state lawsuit brought by attorneys general seeking to block the merger. The states claim combining the third- and fourth-largest wireless carriers in the nation would hurt consumers and competition.

When Pai announced plans to approve the deal earlier this year, he said concessions by the companies made him confident “that this transaction is in the public interest.” The companies agreed to sell assets to Dish so that it can become a wireless carrier, among other changes.

The two Democrats on the FCC voted against the merger but their objections weren’t enough to sway their Republican colleagues.

“Overwhelming evidence demonstrates that the T-Mobile-Sprint merger will reduce competition, raise prices, lower quality, and slow innovation,” said FCC Commissioner Jessica Rosenworcel in a statement.

T-Mobile and Sprint announced plans to merge in April 2018, a deal that would create a $146 billion wireless carrier under the T-Mobile brand. T-Mobile plans to keep its Bellevue, Wash., headquarters and operate a second base in Overland Park, Kansas, Sprint’s hometown.