The greatest challenge to peace in East Asia arises from authoritarian China, so it has been worrying that one of the most strained relationships recently has been between democracies Japan and South Korea. The resolution between them of a long-standing historical dispute, announced Monday, is therefore very good news.

China’s challenge does not arise from its growing prosperity. That has been a boon for hundreds of millions and should be welcomed by other nations. But China’s Communist rulers, especially since the inauguration of President Xi Jinping, have married economic power to a more assertive, even bullying foreign policy. Coupled with increasing repression and government secrecy at home, the rising militarization has worried China’s neighbors. Their biggest fear is that China’s regime, denying its own people liberty and ruling in the name of a discredited communist ideology, will fan nationalism at home to bolster its popularity.

In such a climate, alliances among the Pacific region’s stable democracies, especially the U.S., Japan and South Korea, but also Australia, Taiwan and the Philippines, become ever more important. But Japan and South Korea have been feuding over the legacy of Japan’s colonialization of the Korean Peninsula in the last century. In particular, Koreans have objected that Japan has not adequately acknowledged or compensated what are euphemistically called “comfort women”— Korean girls and women who were taken from their homes during World War II and forced to engage in sex with Japanese soldiers.

Now the two countries have “finally and irreversibly” resolved that dispute, their leaders said Monday. Japanese Prime Minister Shinzo Abe expressed “sincere apologies and remorse to all the women who underwent immeasurable and painful experiences and suffered incurable physical and psychological wounds as comfort women.” The Japanese government pledged $8.3 million to a fund that South Korea’s government will help administer for the benefit of surviving sex slaves. For her part, South Korean President Park Geun-hye promised that, if Japan makes good on its end, her nation will consider the matter closed and refrain from “accusing or criticizing” Japan on the issue in international forums.

Both leaders deserve credit for putting national and global interests ahead of politics. Park is facing criticism from those who say Japan didn’t accept responsibility clearly enough. A nationalist wing of Abe’s Liberal Democratic Party was adamantly opposed to further apologies.

These constituencies won’t go away, and other issues will give opportunities to those who remain suspicious. But the settlement over comfort women, if implemented in good faith, removes the biggest obstacle to improved relations and to smoother cooperation of both countries with the U.S. That is good news for the new year.