Virtually the entire U.S. government is confronting the economic and national security threats that Chinese state-linked technology firms pose to the United States and its allies. But one U.S. government agency — the Federal Trade Commission — is working with China’s leading tech firm against its U.S. competitors. What on Earth is it thinking?

The Trump administration is in the midst of a high-stakes battle to prevent Huawei, China’s leading telecommunications national-champion company, from both infiltrating the telecom infrastructure of Western countries and dominating the future of 5G technology worldwide. The U.S. intelligence community has long believed that Huawei is susceptible to the control of Chinese intelligence services.

The Justice Department is fighting to extradite Huawei Chief Financial Officer Meng Wanzhou, who was arrested in Canada on charges that her company busted U.S. sanctions against Iran. State Department officials have been trying to persuade allies to ban Huawei from building their 5G networks. The Federal Communications Commission even changed its rules to stop rural communities from using U.S. taxpayer subsidies to purchase network gear from Huawei or China’s other telecom giant, ZTE.

That’s why lawmakers and industry analysts were shocked when the Federal Trade Commission — in its case against U.S. telecom giant Qualcomm — called a Huawei executive as its first witness. On Jan. 4, Huawei senior legal counsel Nanfen Yu provided testimony on the FTC’s key allegation, that Qualcomm threatened to cut off its supply of chips unless Huawei agreed to renew a patent license contract on Qualcomm’s terms.

Yu was not the only witness. The FTC also called on an executive from Lenovo, another Chinese firm. And to make its case that Qualcomm’s patent-licensing fees were too high, the FTC brought as a witness Michael Lasinski, who runs a consulting firm whose clients have included Huawei and ZTE.

The case was brought to court just one week before Donald Trump’s inauguration. After FTC commissioners voted 2 to 1 to sue Qualcomm (two commissioner seats were vacant), dissenting commissioner Maureen Ohlhausen issued a rare statement, saying: “I have been presented with no robust economic evidence of exclusion and anticompetitive effects.”

That determination will be up to U.S. District Judge Lucy Koh of the Northern District of California, who already issued one tough ruling against Qualcomm last November. Closing arguments are expected next week. But whatever she decides, the policy implications of the case will continue to play out.

The larger issue is that while most of the U.S. government is fighting Huawei, one part of it is helping Huawei weaken its main U.S. competitor — using the U.S. legal system.

“Federal agencies cannot allow hostile foreign governments to manipulate our laws at the expense of American businesses,” Sen. Marco Rubio (R-Fla.) told me. “Huawei, a Chinese state-directed telecommunications company, threatens U.S. national and economic security and should not be collaborating with our federal agencies in any way, shape or form.”

Rubio and Rep. Jim Banks (R-Ind.) are calling on the Education Department to investigate Huawei’s research partnerships at universities across the country because of concerns over sensitive technology. Banks told me that “the FTC’s dependence on testimony from Huawei in its case against Qualcomm unfortunately serves more to legitimize this insidious, state-run entity and undermines our regulatory system.”

Huawei has denied all accusations, and the Chinese government is defending the company vigorously. Beijing has retaliated for Meng’s arrest by arresting multiple Canadian citizens and sentencing one to death. China realizes the crucial importance of control over the standards and infrastructure of 5G technology worldwide.

Huawei’s own alleged uncompetitive practices — including taking Chinese government subsidies and illegal dumping — are part of the larger U.S.-China trade negotiations ongoing now. The Trump administration knows that if Qualcomm cedes leadership in 5G, Huawei will surely fill the vacuum. President Trump last year blocked Qualcomm’s acquisition by Broadcom after the Committee on Foreign Investment in the United States raised national security concerns.

“The FTC is completely misaligned with the rest of the U.S. federal government,” said Patrick Moorhead, an industry analyst. “They are out to lunch, disconnected from what’s going on in the rest of the world by using Huawei as a premier witness.”

The FTC’s public affairs office is closed and unable to respond to media inquiries because of the government shutdown.

The overall economic struggle with China can play out in one of two ways. Hopefully, through pressure and negotiation, Beijing will agree to compete fairly and play by international rules. If not, Washington will have no choice but to take drastic measures to protect the U.S. economy from Chinese state and industrial economic aggression.

The best chance of avoiding the latter scenario is for the entire U.S. government to work together and cooperate with American firms rather than helping Chinese firms gain the advantage. Patent issues are important, but not as important as our national security.

Read more: