Prime Minister Shinzo Abe has wasted no time in trying to ingratiate himself to President Donald Trump. He should think long and hard about continuing to do so, because the end result may be that Japan becomes the enabler of a U.S. president who leads the alliance down a destructive path.

It’s understandable that Abe would take the approach that he’s made so far. Japan faces threats from China and North Korea, and Abe wants to make sure Tokyo can depend on U.S. military might to uphold the alliance and deter aggression. Such reassurance is more necessary than usual since Trump’s campaign rhetoric suggested that the United States might renege on its commitments without some degree of reciprocity from Japan. Until this point, U.S.-Japan relations have been at or near all-time highs as witnessed by the reciprocal visits of President Obama to Hiroshima and Abe’s visit to Pearl Harbor. Nobody wants to throw that away—especially not when the neighborhood is changing so dramatically.

But the danger is that Trump, with his penchant for communicating via Twitter outbursts and other fits of pique, may force Japan to help pay for wars that it doesn’t support and that aren’t in its interest.

The first reason is in foreign policy: Trump is likely to be incredibly reckless—witness his flouting of the “One China Policy.” He has no respect for the international rules-based system. He believes that strong countries can and should bully weak ones. Note that in first his press conference as president-elect, he commented that once he’s in the White House, certain countries will start respecting the United States more than in the past—and Japan was on the list.

The second reason is in economic policy: The United States is headed for enormous and unsustainable budget deficits. Trump is simultaneously aiming for huge tax cuts, a massive defense buildup, and major investments in infrastructure spending, all while protecting Social Security and Medicare. That’s not economic policy; it’s an unfunded spending binge that courts disaster.

So what will happen if—as seems quite probable—Trump involves the United States in a military conflict in the Middle East, maybe in retaliation for some terrorist act? Or if he blunders into a war with China, thanks to his nonsensical belief that he can “bargain” the One China policy or his secretary of state nominee’s bizarre threats to deny China access to its artificial islands?

Japan will, at the least, be hit up for a large bill. That of course is what happened in 1991 during the first Gulf War when Japan could only support the effort against Iraq via “checkbook diplomacy,” but at that time the United States at least had a reasonable argument that it was defending a principle of the rules-based system (respect of international borders following the invasion of Kuwait) that Japan had an interest in upholding. In the case of the two war scenarios above, Japan would have no interests at stake; indeed, its interests would probably be severely damaged by military conflict while seven decades of nobly standing for the peaceful resolution of disputes would go out the window.
So in addition to gaining the President’s trust, Japan ought to be preparing for the day in which it may have to say “no” to Trump. That means developing a foreign and military posture that allows Tokyo to protect its national interests without U.S. military support. It means developing military forces capable of deterring North Korea from attacking Japanese cities—perhaps even an independent deterrent capability. What it means with regard to China is a more difficult question, perhaps a readiness to cut a generous deal on the dispute over the Senkaku Islands in exchange for Chinese guarantees never to interfere with Japanese commercial shipping.

This doesn’t mean Tokyo has to abandon the U.S.-Japan military alliance, and it certainly doesn’t mean Japan should foment unfriendly relations with the American people. There’s a good chance that Trump’s worst impulses will be checked by Congress or by the larger Washington bureaucracy. But for now, Abe should be treating Trump with great caution and with preparations underway for a completely different approach, even an independent approach, if the worst happens.

An independent military and deterrence capability will no doubt be domestically controversial given the public furor over the security legislation which enabled Japan to participate more fully in collective self-defense. Abe will need to clearly and unequivocally demonstrate to the public why such a capability is necessary, what capabilities would be included, why the Japanese government can be trusted with an independent military force without fear of remilitarization, and what burdens—financial and otherwise—the Japanese public would need to bear. It will be a fraught, but necessary, discussion.

The bottom line is that Japan faces some risk by alienating itself from Trump, but a greater risk of enabling his worst instincts. Abe needs to ensure that Japan avoids the latter fate.

Paul Blustein is a senior fellow with the Centre for International Governance Innovation