Japanese Prime Minister Shinzo Abe, left, and President Trump, right, shake hands during a news conference at Trump's private Mar-a-Lago Club in Palm Beach, Fla., on Wednesday. (Lynne Sladky/AP)

THE TRUMP presidency has been an unsettling time for the United States’ traditional post-World War II allies, and none has found it more difficult to adjust than Japan. Prime Minister Shinzo Abe has been showering attention and ostentatious affection on President Trump since he first made the trek to Mar-a-Lago in February 2017. His reward has been a series of policy actions that imply Mr. Trump just doesn’t care: Mr. Trump formally pulled out of the Trans-Pacific Partnership, planned by Mr. Abe and former president Barack Obama as the linchpin of a 21st-century U.S.-Japan relationship; later, Mr. Trump imposed tariffs on steel and aluminum and exempted all allies but Japan; most recently, he shocked Mr. Abe by announcing a one-on-one meeting with North Korea’s Kim Jong Un, whose weapons threaten nearby Japan as much or more than they threaten the United States.

And so Mr. Abe was back at Mar-a-Lago this last week, trying to explain the risks to both countries of any American economic and security strategy for Asia that sidelines Japan. Whether Mr. Abe survives his current political scandals at home or not, the importance of a sound bilateral relationship will remain, and Mr. Trump should do more to stabilize it.

A big part of the problem is the American president’s fixation on the bilateral U.S.-Japan trade deficit, which has been a bugaboo for him since the late 1980s, but which was actually $16 billion lower in 2017 than it was in 2007. Deep-seated suspicion of Japanese trade policy is one reason Mr. Trump rejected the TPP, and why he reverted to that position last week after momentarily suggesting that he might reconsider it. Maybe Mr. Trump thinks he can get Japan to capitulate to his trade demands by implying that the alternative is no Japanese input on a North Korean denuclearization deal; Japan is keenly, and understandably, concerned that an agreement eliminate the threat North Korean ballistic missiles pose to its territory. Any such tactics would be both unseemly treatment of an old friend and likely to fail, because public opinion in Japan would forbid any Japanese prime minister, whether Mr. Abe or a successor, to play along.

Mr. Trump did send Mr. Abe home with a public assurance that the agenda for his summit with Mr. Kim would include the fate of Japanese citizens abducted by North Korea, a key concern of Tokyo’s. That’s a start, but much more needs to be done. There’s a reason the diplomatic framework for North Korea has always included “six-party” talks, with one of the six parties being Japan: A deal that does not account for Japan’s legitimate interests could destabilize Northeast Asia rather than stabilize it. Maybe China’s Xi Jinping would appreciate sidelining Japan, but Mr. Trump should not even appear to let China drive a wedge between Washington and Tokyo. A good start would be to re-engage with Japan and other Pacific nations on the TPP, signaling to both Beijing and Pyongyang that long-standing U.S. commitments are solid and independent of the denuclearization talks. As the United States prepares for these negotiations, it needs all the friends it can get.