For several months , Japan and South Korea, America’s main allies in East Asia, have been going at each other. Japan stripped South Korea of trading privileges; then South Korea removed Japan from a list of favored trade partners. In late August, Seoul announced that it would cancel an agreement with Tokyo over the sharing of sensitive military intelligence, including about North Korea’s nuclear and missile programs. The tiff, some observers argue, marks a low in relations since the two countries normalized ties in 1965 after decades of friction over conflicting interpretations of Japan’s record during its occupation of the Korean Peninsula from 1910 to 1945 — forced labor, territorial claims, sexual slavery. Those debates hardly have been settled, it turns out, and they still inflame nationalist impulses on both sides. History is more than just background music to the present.

President Trump has said of the United States allies, “If they need me, I’m there” — he meant that he would be available to negotiate between Prime Minister Shinzo Abe of Japan and President Moon Jae-in of South Korea. He is expected to meet with each leader this week, on the sidelines of the annual session of the United Nations General Assembly. But if Mr. Trump hopes to make any headway, he will have to do what the United States government has long refused to do: He will have to recognize that if Japan and South Korea still weaponize their history today, it is partly because of the United States’ role in it — and because the United States has long played favorites between the two.

The current rift centers on a Washington-brokered 1965 treaty that was supposed to normalize relations between South Korea and Japan, in particular by settling any South Korean claims regarding Japan’s enforcement of compulsory labor during the war. Some historians estimate that between 700,000 and 800,000 Koreans were forced to work in Japan during the war, often under horrible conditions.

The Japanese government argues that the 1965 treaty settled “finally and completely” all questions to do with compensation for forced labor. (The deal, in addition to establishing diplomatic and business relations between the two countries, provided that Japan would give South Korea $500 million in grants and loans.) South Koreans disagree. The latest fracas was sparked by a ruling of the Supreme Court of South Korea in late 2018, which allowed 11 Korean men and women who claimed to have been forced into labor to seek compensation from Japan’s Mitsubishi Heavy Industries .