A federal government committee and other top regulators in the United States have approved the proposed merger between T-Mobile and Sprint, paving the way for a union between the country’s third- and fourth-largest wireless operators.

The Committee on Foreign Investment in the United States — a body that reviews foreign investments in the United States for national security threats — the Department of Justice, the Department of Homeland Security, and the Department of Defense all agreed to the $26.5 billion deal, T-Mobile said in a statement Monday.

Some investors, consumer advocates and government officials opposed the merger, claiming that the new telecommunications giant would limit customer choices and result in high prices for consumers.

Proponents of the deal said it would make the combined company, with about 100 million customers, a competitor that would be able to go toe-to-toe with AT&T and Verizon in the battle to dominate the next frontiers of wireless technology in the United States. John Legere, T-Mobile’s chief executive, has argued that he would “lower prices to attract new customers.”

The combination would still need to secure approval from the Federal Communications Commission, which has scrutinized a possible T-Mobile-Sprint merger before. In 2014, regulators at the FCC rejected a proposed merger, concluding that effectively reducing the U.S. wireless market to three major carriers from four would not be good for consumers.

The deal remains subject to other regulatory approvals as well. If the two companies receive those approvals, the deal is expected to close during the first half of 2019, according to T-Mobile.

In the past, U.S. regulators rejected attempted mergers in the telecommunications industry, such as AT&T’s $39 billion proposal to buy T-Mobile in 2011, on the grounds that more competitors are better for consumers because they result in lower prices and superior services.

The T-Mobile-Sprint deal has also raised national security concerns from some lawmakers. They cite a company not involved with the deal: Huawei, the Chinese maker of telecommunications gear.

U.S. officials have long labeled Huawei a national security threat. The major telecommunications companies in the United States, including Sprint and T-Mobile, have avoided using the company’s equipment to run its networks.

Still, the two companies’ corporate parents are Huawei customers. Sprint is controlled by SoftBank of Japan, while T-Mobile is controlled by its German parent, Deutsche Telekom.

Their ties to Huawei may be changing, however. The timing of the approval comes as Deutsche Telekom is weighing a re-evaluation of its purchasing strategy following the ongoing controversy around Huawei. Deutsche Telekom said it was taking seriously the “global discussion about the security of network elements from Chinese manufacturers.”

In Japan, government officials have said they are developing procedures for procurement in areas like communications networks and information technology with an eye on cybersecurity. Government officials have denied that the guidelines would single out Chinese companies like Huawei.

“This doesn’t mean to exclude particular companies,” Yoshihide Suga, Japan’s chief cabinet secretary, said last week. “It’s extremely important not to procure equipment that are embedded with malicious functions.”

Takatoshi Mori, a spokesman for SoftBank, said reports that SoftBank was also reconsidering its relationship with Huawei “are based on speculation.” But he added, “we will consider our future policies while abiding by the government’s policy,” and said it gets most of its networking equipment from European vendors.

Western governments, including the United States, are worried that Huawei’s systems could be susceptible to spying by the Chinese government. Australia and New Zealand have both banned Huawei equipment from planned 5G networks in those countries. A top executive from Huawei, Meng Wanzhou, is awaiting extradition to the United States from Canada, in a case that has inflamed tensions between China and the United States.