At a visit to the Anne Frank House in Amsterdam, Japanese Prime Minister Shinzo Abe said on Sunday that nations must face the facts of history, and his spokesman said there was no contradiction with his recent controversial visit to the Yasukuni war shrine at home.
The house, where the German-born Jewish girl kept a diary of her life in hiding before she was discovered and died in a Nazi concentration camp, is now one of the best-known memorials to the victims of the Holocaust, drawing more than a million visitors each year.
"The 20th century was characterised by war and by the violation of basic human rights. I want to ensure the same things do not happen in the 21st century, and I share responsibility to realise this goal," said Abe, who is in the Netherlands for a G7 summit and a nuclear security meeting.
In December, Abe angered China and South Korea by visiting Tokyo's Yasukuni Shrine, which they see as a symbol of Japan's wartime aggression as it honours convicted war criminals as well as others who died in battle.
"We would like to face the historical facts in a humble manner and to pass on the lessons of history to the next generation," Abe said, in front a large picture of Anne Frank.
He added that by doing so, he wanted to "realise peace in the entire international community".
Abe took no questions and left after a brief tour of the hidden annexe where Frank and her family hid from the Nazis from 1942 to 1944.
Asked whether there was a difference between visiting a memorial to Japanese soldiers at home and a memorial to war victims abroad, a Foreign Ministry spokesman said: "There is no contradiction."
He said Yasukuni enshrines 2.46 million people who died for their country during conflicts since 1853, including both world wars, and that at the time of the visit, Abe had issued a pledge that Japan must never wage war again.
China and South Korea, which have both been occupied by Japan, have repeatedly criticised visits by Japanese leaders to the shrine and say that Japan, unlike Germany, has not atoned for its wartime atrocities.
China's ambassador to Germany this year compared Abe's Yasukuni visit to the unthinkable idea of a German chancellor laying flowers on Hitler's bunker.
With his visit to the Anne Frank house, Abe seems to have scored a point in a subtle war of words between China and Japan over their unresolved World War Two issues and China's attempts to put these on a European stage.
Sources told Reuters last month that Chinese President Xi Jinping wanted to make World War Two a key part of a trip to Germany this month, but had been refused a visit to the Holocaust Memorial in Berlin.
Xi is also in the Netherlands on a state visit, but he and his wife on Sunday visited a tulip show in Keukenhof castle.
At a visit to the former Auschwitz death camp in Poland in 2012, then Chinese premier Wen Jiabao said that only those who remember history can build a good future.
A Dutch guide who took Abe through the house's narrow stairs and corridors said that he, like most visitors, had been awed by seeing the confined space and the young girl's diaries.
Abe said he had read the diaries as part of his recommended reading at school and that, as a child, he had seen a film about her life.
The Anne Frank story is well known in Japan and more than 33,000 Japanese tourists visited the house last year.