SEOUL, South Korea - An apology from Japan's prime minister and a pledge of more than $8 million sealed a breakthrough deal Monday in a decades-long impasse with South Korea over Korean women forced into Japanese military-run brothels during World War II.

The accord, which aims to resolve the emotional core of South Korea's grievances with its former colonial overlord, could begin to reverse decades of animosity and mistrust between the two thriving democracies, trade partners and staunch U.S. allies. It represents a shift for Tokyo's conservative government and a new willingness to compromise by previously wary Seoul.

A statement by both countries' foreign ministers said Prime Minister Shinzo Abe "expresses anew his most 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 euphemistic name given the women.

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

It wasn't immediately clear if Abe would be issuing a separate written statement or if it would be directly delivered to the 46 surviving former Korean sex slaves, now in their 80s and 90s.

The language mirrored past expressions of remorse by other prime ministers, although it was seen by some in Seoul as an improvement on previous comments by Abe's hawkish government, which has been accused of whitewashing wartime atrocities.

Another deciding factor was that the 1 billion yen [$8.3 million] - to create a foundation to help provide support for the victims - came from the government, not private sources, something Tokyo has resisted in the past.

South Korean Foreign Minister Yun Byung-se said Seoul considers the agreement "final and irreversible," as long as Japan faithfully follows through with its promises.

Later Monday, Abe called South Korean President Park Geun-hye and reiterated his apology. He said Tokyo would implement the deal and called the issue settled irreversibly. Park said she hoped the two countries will build mutual trust and open a new era in ties based on the agreement.

After phoning Park, Abe told reporters that the agreement was based on his commitment to stop future generations from having to repeatedly apologize.

"Japan and South Korea are now entering a new era," Abe said. "We should not drag this problem into the next generation."

Park issued a separate statement saying the deal was the result of her government's best efforts to resolve the sex-slave issue, given its urgency. "Most of victims are at an advanced age and nine died this year alone," she said.