Remember “The Manchurian Candidate”? The 1959 novel, made into a classic 1962 film, involved a plot to install a communist agent as president of the United States. The politician in question was modeled on Sen. Joe McCarthy — that is, he posed as a superpatriot even while planning to betray America.

It all feels horribly relevant these days. On one side, the “Make America Great Again” president is pursuing protectionist policies, supposedly in the name of national security, that will alienate many of our democratic allies. On the other side, he seems weirdly determined to prevent action against genuine national security threats posed by foreign dictatorships — in this case China. What’s going on?

International trade is governed by a system of multinational agreements that countries are not supposed to break unilaterally. When that system was created (under U.S. leadership) in 1947, its framers realized that it had to have a bit of flexibility, a few escape valves to let off political pressure. So nations were allowed to impose tariffs and other trade barriers under certain conditions, like sudden import surges.

Meanwhile, the U.S. created a domestic system of trade policy designed to be consistent with these international rules. Under that system, the White House can initiate investigations into possible adverse effects of imports and, if it chooses, impose tariffs or other measures on the basis of these investigations.

The conditions under which such actions are allowable are limited — with one big exception. Both the international rules and domestic law — Article XXI and Section 232, respectively — let the U.S. government do pretty much whatever it wants in the name of national security.

This national security exemption has been invoked very rarely, precisely because it’s so open-ended. If the U.S. or any other major player began promiscuously using dubious national security arguments to abrogate trade agreements, everyone else would follow suit, and the whole trading system would fall apart. That’s why there have been only a handful of Section 232 investigations over the past half century — and most of them ended with a presidential determination that no action was warranted.

But President Trump is different. He has already imposed tariffs on steel and aluminum in the name of national security, and he is now threatening to do the same for autos.

The idea that imported cars pose a national security threat is absurd. Almost all the cars we import come from U.S. allies. Clearly, Trump’s invocation of national security is a pretext, a way to bypass the rules that are supposed to limit arbitrary executive action.

And their economic side effects aside, the proposed auto tariffs would further undermine our allies’ rapidly eroding faith in U.S. trustworthiness.

Which is not to say that national security should never be a consideration in international trade. On the contrary, there’s a very clear-cut case right now: the Chinese company ZTE, which makes cheap phones and other electronic goods.

ZTE products include many U.S.-made high-technology components, some of which are prohibited from being exported to sanctioned regimes. But the company systematically violated these export rules, leading the Commerce Department to ban sales of those components to the company. And the Pentagon has banned sales of ZTE phones on U.S. military bases, warning that the phones could be used to conduct espionage.

Yet Trump is pulling out all the stops in an effort to reverse actions against ZTE, in defiance of lawmakers from both parties.

What’s behind his bizarre determination to help an obvious bad actor? China approved a huge loan to a Trump-related project in Indonesia just before the president rushed to ZTE’s defense; at the same time, China granted valuable trademarks to Ivanka Trump. If we do have a president who’s bribable, that’s going to give dictators a leg up over democracies, which can’t do that sort of thing because they operate under the rule of law.

Of course, there might be other explanations. Maybe President Xi Jinping told Trump that he needed to abase himself on this issue to get a trade deal he can call a “win.” Somehow this doesn’t sound much better.

Whatever the explanation, what we’re getting is Manchurian trade policy: a president using obviously fake national security arguments to hurt democratic allies, while ignoring real national security concerns to help a hostile dictatorship.

Paul Krugman is a columnist for The New York Times.