Updated

South Korea said Wednesday it will dissolve a foundation funded by Japan to compensate South Korean women who were forced to work in Japan's World War II military brothels.

The widely expected decision effectively kills a controversial 2015 agreement to settle a decades-long impasse over the sexual slavery issue and threatens to aggravate a bitter diplomatic feud between the Asian U.S. allies over history.

Seoul's Ministry of Gender Equality and Family said in a statement that it will take legal steps to dissolve the foundation. Lee Nam-hoon, an official from the gender equality ministry, said Seoul's Foreign Ministry plans to consult with Tokyo on what to do with the 1 billion yen ($8.8 million) Japan funded to the foundation that was formally launched in July 2016.

"After considering gathering diverse opinions over the 'Reconciliation and Healing Foundation' based on victim-centric principles, we have decided to push for the dissolution of the foundation," 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 sexual slavery victims.

Historians say tens of thousands of women from around Asia, many of them Korean, were sent to front-line military brothels to provide sex to Japanese soldiers.

Liberal South Korean President Moon Jae-in, who has been a harsh critic of the 2015 deal reached under his conservative predecessor, told Japanese Prime Minister Shinzo Abe during a meeting in September that the foundation was failing to function properly because of strong opposition by the victims and public.

South Korea and Japan are already at odds over a ruling by Seoul's Supreme Court last month that a major Japanese steelmaker should compensate four South Koreans for forced labor during Japan's colonial rule of the Korean Peninsula before the end of 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 Tokyo to Seoul.

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

Lee, the ministry official, said the foundation had used 4.4 billion won ($3.8 million) in cash payments to 34 victims who were alive at the time of the 2015 deal and to relatives of 58 victims who were dead by then. Only 27 of the 240 South Korean women who registered with the government as victims of Japan's wartime sexual slavery are currently alive, Lee said.

Many in South Korea believed the Seoul government settled for far too less in the sex slave deal and that Japan still hasn't acknowledged legal responsibility for atrocities during its colonial occupation of the Korean Peninsula from 1910 to 1945.

Under the 2015 agreement, which was then described by both governments as "irreversible," Japan pledged to fund the foundation to help support the victims. However, Japan said it didn't consider the 1 billion yen it provided to the fund as compensation, saying such issues were settled in a 1965 treaty. South Korea, in exchange, vowed to refrain from criticizing Japan over the issue and will try to resolve a Japanese grievance over a statue of a girl representing victims of sexual slavery that sits in front of the Japanese Embassy in downtown Seoul.