Tokyo: Japan warned the issue of its wartime system of sex slavery was not a “diplomatic” subject, after US President Barack Obama on Friday called it a “terrible” violation of human rights.

Katsunobu Kato, deputy chief cabinet secretary, said Japan was aware of the suffering of the victims and was trying to avoid politicising the emotional issue.

“Prime Minister Shinzo Abe has said he is deeply pained to think of the people who experienced immeasurable pain and suffering,” Kato said in a television programme late Friday.

“This issue should not be made into a political or diplomatic subject,” he said.

In a press conference in South Korea Friday, Obama called for an accounting of the wrongs perpetrated by Japanese troops before and during the Second World War when thousands of women were forced into prostitution, many from the Korean peninsula.

“This was a terrible, egregious violation of human rights. Those women were violated in ways that, even in the midst of war were shocking,” Obama said.

But the US president also pressed Tokyo and Seoul to look to the future.

“It is in the interests of both Japan and the Korean people to look forwards as well as backwards and to find ways in which the heartache and the pain of the past can be resolved,” Obama said.

Washington finds it frustrating that its two major allies in the region are unable to resolve their issues and work together on other pressing issues, such as an increasingly strident China and Pyongyang’s nuclear weapons programme.

Despite formal apologies issued by the Japanese government, South Korea accuses Tokyo of failing sufficiently to atone for the “comfort women”, who were pressed to service its troops during its brutal war of expansion.

Japan previously used a quasi-public fund to give compensation accompanied by a letter of apology from the prime minister.

But Japan has long maintained that the two nations have resolved reparation issues from the Second World War by signing treaties.

Japanese media said Obama was trying to urge both Tokyo and Seoul to stabilise their working relationship.

Obama was calling on Japan to take proactive stance on the comfort women issue, while also pressing Seoul to overcome emotional reaction, the liberal Tokyo Shimbun said in an analysis.

The influential Asahi Shimbun said South Korea might heighten pressure on Tokyo to address the comfort women issue after the Obama remark.

But the daily also said a piece of American advice was also directed at South Korea.

“Obama is seen calling on South Korea to become more flexible because the future-oriented cooperation between Japan and South Korea has not been able to move forward as South Korea strongly remains hung up on the past history,” the Asahi said.