Prime Minister Shinzo Abe on Wednesday warned South Korea that it risked damaging ties by dissolving a foundation set up as a key pillar of a 2015 bilateral agreement with Tokyo to settle the issue of Korean “comfort women” forced to provide sex for Japanese troops before and during World War II.

The agreement, under which Japan provided ¥1 billion (about $8.8 million) to the foundation to help former comfort women and their families, has been deeply unpopular in South Korea.

Japan-South Korea ties have long been strained over historical grievances related to Japan’s 1910-1945 colonial rule of the Korean Peninsula.

Japan reacted immediately to Wednesday’s move, with Vice Foreign Minister Takeo Akiba summoning South Korea’s ambassador to Japan, Lee Su-hoon, to the Foreign Ministry in Tokyo to lodge a protest.

Shortly after, Abe urged South Korea to abide by its international agreements.

“Relationships between a country and another cannot come into existence unless each of them keep their promises,” Abe told reporters. “I would like to ask South Korea to behave in a responsible manner.”

Foreign Minister Taro Kono also weighed in on the news, calling the decision “totally unacceptable” given the landmark 2015 government-to-government deal that was supposed to settle all the diplomatic rows over the comfort women issue once and for all.

That agreement was reached by the two countries’ top diplomats and was later confirmed by Abe and then-South Korean President Park Geun-hye.

Kono also pointed out that 34 of the 47 onetime comfort women who were alive at the time of the agreement and 58 families of 199 who had died had already received funds from the foundation .

“Many ex-comfort women have given high ratings” to the activities of the foundation, he told reporters in Tokyo.

“The agreement is something that should be implemented even after a change of administration. It has been highly rated by international society,” he said, adding that Tokyo would continue urging Seoul to implement what was agreed to under the deal.

The Japanese government has been under added pressure after a recent South KoreanSupreme Court ruling ordered a Japanese company to compensate a group of South Koreans over forced labor during World War II.

Abe said Tokyo will respond “resolutely” to the ruling, which he described as a violation of a 1965 treaty between Seoul and Tokyo that restored diplomatic ties and was accompanied by more than $800 million in economic aid and loans from Japan to South Korea.

Japan and South Korea agreed in December 2015 to “finally and irreversibly” settle the comfort women issue. As part of the deal, South Korea set up the Reconciliation and Healing Foundation and used the Japanese money to hand out cash payments to the women and their families.

But the administration of South Korea’s current president, Moon Jae-in, has taken the view that the bilateral accord, reached under the previous administration of President Park Geun-hye, cannot settle the issue, and has taken steps to replace the Japanese fund with its own budget.

In September, Moon told Abe that the foundation was not functioning as intended and suggested it may need to be discontinued. Japan, for its part, stressed the importance of following through on the agreement.

In announcing the foundation’s dissolution on Wednesday the South Korean government said it plans to take legal steps to dissolve the entity. Media reports said Seoul expects it will take six to 12 months to complete legal procedures needed for dissolving the foundation.

“After considering diverse opinions over the ‘Reconciliation and Healing Foundation’ based on victim-centric principles, we have decided to push for the dissolution of the foundation,” South Korean Gender Equality Minister Jin Sun-mee said in a statement. She said the ministry will continue to push policies to “restore the honor and dignity” of the comfort women.

As for the 5.78 billion won ($5.1 million) leftover from the Japanese fund, the South Korean government said it will come up with a reasonable way to spend it — along with the added 10.3 billion won it has budgeted itself — after hearing the opinions of former comfort women and others. The South Korean Foreign Ministry plans to consult with the Japanese government over the matter, it added.

Kim Bok-dong, a surviving former comfort woman, welcomed the decision to disband the fund. “The only thing left is the Japanese government’s repentance and compensation,” she said in a statement released by a civic group supporting the victims, known as Jungdaehyup.

The group, and the House of Sharing, another major advocacy organization that provides a shelter for the victims, respectively issued a statement, calling for Seoul to nullify the deal and return the ¥1 billion to Japan.

At the time of the deal, Seoul said there were 46 surviving South Korean comfort women. But 19 of them have since died. Twelve victims who rejected payment from the foundation sued the Seoul government over the agreement in August 2016, saying it didn’t go far enough to establish Japan’s responsibility.

Only 27 of around 240 South Korean women who registered with the government as victims are currently alive.