Defence Minister Minoru Kihara, Economic Security Minister Sanae Takaichi, and Yoshitaka Shindo, the economic revitalisation chief, visited the site in Tokyo, the capital.
Fourteen prominent convicted war criminals, including wartime prime minister Hideki Tojo, are among the 2.5 million war dead honoured at the shrine.
“I would like to express my heartfelt condolences today to all those who sacrificed their precious lives and pay my deepest respect,” Kihara said at the shrine, in comments aired on television.
“I understand that all of them visited the shrine in their private capacity and that it is not a matter for the government to comment on,” Japan’s top government spokesperson, Yoshimasa Hayashi, told a regular press conference.
“It is natural for any nation to pay respect to those who have given their lives for their country.”
South Korea, a Japanese colony for 35 years, and China, which was invaded by Japan, see the shrine as a magnet for conservatives who want to gloss over their neighbour’s wartime actions.
“Our government urges responsible Japanese leaders to face history and demonstrate humble reflection and genuine introspection,” South Korea’s foreign ministry said.
“This is an important foundation for the development of forward-looking relations,” it added in a statement.
China has made serious representations to the Japanese side and has made its position clear, its foreign ministry said on Thursday.
“The actions of some Japanese dignitaries regarding the Yasukuni Shrine once again reflect the wrong attitude of the Japanese side toward the issue of history,” the ministry said in a statement.
Supporters of Yasukuni, established in 1869 as Japan emerged from more than two centuries of isolation, say it commemorates all the war dead and not only those blamed for waging war on neighbours.
“We can live happily now because our ancestors fought in the war,” said Yuka Watanabe, 50, a visitor to the shrine, where men wearing World War Two-era military uniforms bowed and marched with flags.
“I don’t think we should ever forget that.”
Kishida, who plans to step down in September, stayed away, sending an offering instead, Japanese media said.
Takaichi is among about half-a-dozen people touted as his possible successor.