TOKYO/SEOUL (Reuters) – Japanese Prime Minister Shinzo Abe, speaking on the 75th anniversary of Japan's World War Two surrender, pledged never to repeat the tragedy of war and Emperor Naruhito expressed “deep remorse” over the wartime past, which still haunts East Asia.

“Never to repeat the tragedy of war. We will continue to remain committed to this resolute pledge,” said Abe, wearing a face mask at an official ceremony for war dead on Saturday that was scaled back because of the COVID-19 outbreak.

Abe, who did not echo Naruhito's reference to remorse, sent a ritual offering to Tokyo's Yasukuni Shrine for war dead. But he avoided a personal visit that would anger China and South Korea.

South Korean President Moon Jae-in said in a speech Seoul was always ready to discuss history disputes with Tokyo.

At least four Japanese cabinet ministers paid their respects in person at Yasukuni, which honours 14 Japanese wartime leaders convicted as war criminals by an Allied tribunal, as well as Japan's war dead. The shrine is seen by Beijing and Seoul as a symbol of Japan's past military aggression.

Japan photo

Shuichi Takatori, a member of Abe's ruling Liberal Democratic Party, told reporters he made the offering on behalf of Abe as party leader, delivering a message that Abe “paid his respects from the heart to the war dead and prayed for the rest and permanent peace of their souls.”

Abe has not gone to Yasukuni in person since a December 2013 visit that outraged China and South Korea, but has sent offerings.

Environment Minister Shinjiro Koizumi, 39, often floated as a future premier, was among the ministers who visited the shrine on the emotive anniversary.

Related: Pearl Harbor survivor remembers victory in World War II as 75th anniversary of VJ Day nears

South Korea's foreign ministry spokesman expressed “deep disappointment and concern” over the ministers' visit and said Japan's leaders must show their “deep remorse through action”.

Thousands of men and women braved scorching heat amid the COVID-19 pandemic to pay their respects at Yasukuni, where queues quickly became congested, despite markers and signs seeking to maintain social distance. Many people stood in long queues for hours, holding parasols to block the sun in heat over 35 degrees Celsius (95 degrees Fahrenheit).

“I earnestly hope that the ravages of war will never again be repeated,” Naruhito, 60, said at the official ceremony after bowing together with Empress Masako before an altar in front of a bank of flowers. Both royals also wore face masks.

The grandson of Emperor Hirohito in whose name Imperial troops fought the war, Naruhito is Japan's first monarch born after the war. He ascended the throne last year after his father, Akihito, abdicated.

The United States and Japan have become staunch security allies in the decades since the war's end but its legacy still haunts East Asia.

Japan photo

Koreans, who mark the date as National Liberation Day, resent Japan's 1910-1945 colonisation of the peninsula.

China has bitter memories of imperial troops' invasion and occupation of parts of the country from 1931 to 1945.

“We must learn from history, let history be a warning for the future, and show that we are prepared to fight in the event of a war”, said a commentary by the official newspaper of China’s military, the People’s Liberation Army.

Japan's ties with South Korea especially are strained by a dispute over compensation for Koreans forced to work in Japan's wartime mines and factories.

“The door for negotiation is still widely open,” Moon said in a speech in Seoul.

Related: The Last Surrender: What The US Should Learn From The End Of World War II

Relations are also strained over “comfort women”, as women, many Korean, made to work in Japanese military brothels are euphemistically known.

Consensus over the war remains elusive within Japan, where more than 80% of people were born after the conflict's end.

Abe has said future generations should not have to keep apologising for mistakes of the past.

One visitor to Yasukuni, Nobuko Watanabe, 51, said she understood why Koreans would resent visits there but added ties could improve. “When people talk to each other one-on-one … we are able to communicate and open our hearts to each other.”

Fewer than 600 people, including relatives of war dead, took part in Saturday's state-sponsored ceremony, down from more than 6,000 last year. Seats were spaced out and a musical performance replaced the singing of the national anthem.