The quarrel between Japan and South Korea reached a new low last week when Seoul pulled out of an intelligence-sharing agreement that had taken the United States years to broker. What’s behind this dispute?

Some observers blame President Trump for neglecting these two U.S. allies. But relations between Japan and South Korea have soured numerous times over decades, long before Trump came along.

Others point to Japan’s brutal history in Korea and Tokyo’s handling of the past. Japan committed terrible violence against Koreans in the 20th century, and Japanese policies since then have sometimes triggered bilateral crises. But this story, too, is incomplete.

Korean resentment about history has been a constant over this period. It is the South Korean government’s interest in activating, or suppressing, this resentment that has varied.

Japan’s history on the Korean Peninsula made the normalization of relations difficult

Japan annexed Korea in 1910. For the next 35 years, Japan brutalized Koreans in many ways ⁠ — forcing them to work as slave laborers in Japanese companies and as sex slaves, or “comfort women,” as they were known, for Japanese soldiers during World War II.

After liberation, Koreans reviled Japan. South Korean President Syngman Rhee told American officials that Koreans feared the Japanese more than the North Koreans or the Soviets. Negotiations to establish even basic political relations between Seoul and Tokyo dragged on for more than a decade.

But a subsequent president, Park Chung-hee, perceived an interest in moving forward. He promoted economic development as essential for his country’s prosperity and security, and saw Japan as a key source of capital. Park normalized relations with Japan in 1965.

The normalization treaty obliged Japan to pay compensation (in grants and loans) but — crucially — declared the matter of compensation settled. The South Korean people were incensed, erupting into mass protests that led Park to declare martial law. Compensation flowed into development projects and into Park’s political slush funds — not to victims.

Normalization led to increasing economic integration between the two countries. Their security relations sometimes warmed as well. During the Vietnam War, fearing U.S. abandonment and a worsening security environment, Seoul and Tokyo sidestepped historical fights and expanded their cooperation. When the regional security environment worsened in the 1980s, Seoul welcomed a more militarily active Japan in Asia.

To be sure, Japanese behavior affected relations, too. At times, Koreans were outraged by Japanese textbooks they viewed as evasive and by leaders’ visits to the controversial Yasukuni Shrine or their denials of past atrocities. At other times, Tokyo sought to improve relations, offering gestures such as the Kono statement, an important apology in 1993, and the 1998 Joint Declaration with Seoul.

But here’s the key point: Japanese debates about the past have produced everything from powerful contrition to shocking denials — much what one expects in democracies. Sometimes South Korean leaders chose to move forward, and sometimes they fanned historical outrage to curry favor with voters, distract from scandals or manage foreign policy agendas, such as the delicate dance between the United States and China.

Korean politics sent Japan-South Korea relations into their latest tailspin

The roots of the current dispute lie not in the past, but in the politics of the present.

Bilateral relations started to improve a few years ago. Conservative leader Park Geun-hye, concerned about North Korea’s nuclear program, moved closer to Japan. Her government signed a 2015 agreement on the “comfort women” — which Seoul and Tokyo announced was the “final and irrevocable resolution” on the issue — and the 2016 intelligence-sharing pact to improve defenses against North Korean missiles.

Park also sought to prevent a judicial decision from derailing bilateral relations. In 2013, a lower court had ruled in favor of Korean wartime forced laborers, who were suing Japanese companies for compensation. The court sided with the plaintiffs: against Article II of the 1965 treaty, which declared all financial claims between the countries and their people “settled completely and finally,” and against the treaty’s Article III that specified dispute-resolution measures.

It has come to light that Park pressured the Supreme Court to delay ruling on the case. She also ordered her Foreign Ministry to file a statement with the court saying that upholding the verdict would cause relations with Japan to “irreversibly deteriorate.”

Park was impeached in 2017 and replaced by liberal opposition leader Moon Jae-in. More dovish toward North Korea and less accommodating toward Japan (and the United States), Moon began to dismantle Park’s agenda. To Tokyo’s frustration, Moon criticized the 2015 comfort women agreement and this summer closed the foundation it had created to disburse Japanese reparations to survivors.

The forced labor case comes to a far-reaching decisions

The Supreme Court’s rulings on the issue of damages to wartime forced laborers ignited the current crisis.

In rulings last fall, the court upheld the 2013 verdict that had ordered Japanese firms to pay damages. When the companies refused, citing the 1965 treaty, the court ordered to fund the settlement by seizing the Japanese companies’ assets in South Korea.

It is unclear whether the Moon government, like his predecessor, attempted to influence the Supreme Court in either direction. Regardless, the crisis fits a predictable pattern in relations between Japan and South Korea: A conservative government, worried about North Korea, sought to improve relations with Japan, only to see relations tumble into crisis when it was replaced by a liberal government that is more dovish toward North Korea and more prickly toward Japan and the United States.

Tokyo has since punished South Korea by removing it from its “white list” of countries that receive automatic approval for purchases of chemicals with dual military and commercial uses. The Japanese government characterized the move as a separate matter, rather than retaliation.

Seoul retaliated in kind. Last week, dismantling another one of Park’s policies, Moon terminated the intelligence pact. Many security analysts, such as Andrew Yeo here in the Monkey Cage, argued that the move undercuts trilateral cooperation and weakens deterrence.

Beyond the security implications, the South Korean decision to ignore the 1965 treaty and seize private Japanese assets may also seriously disrupt Japan-South Korea economic relations. By alarming firms that invest in South Korea, it may have wider reverberations for the South Korean economy and for global supply chains.

When Seoul and Tokyo clash, observers often blame history and memory. Although a terrible history lies at the center of this dispute, the past has been there all along. To understand why this crisis flared, look to the politics of the present.

Jennifer Lind is an associate professor of government at Dartmouth College and research associate at Chatham House. She is the author of “Sorry States: Apologies in International Politics” (Cornell University Press, 2008). Follow her on Twitter @profLind.