TOKYO, 17 August 2004 — Japan marked the 59th anniversary of its World War II surrender Sunday, caught between regret for the suffering it inflicted and the resurgent nationalism that is pushing the country to become a global power.

“I renew our deep remorse and offer sincere condolences to the victims,’’ Prime Minister Junichiro Koizumi said at a government ceremony at a cemetery for war dead in Tokyo. As Emperor Akihito looked on, Koizumi said the era of invasion and colonization that ended with defeat in 1945 had “caused huge damage and pain to people in many countries, particularly in Asian nations.’’

But Koizumi also asserted his government’s determination to make Japan a prominent international player. Encouraged by the Bush administration, which is seeking a more active East Asian partner, Koizumi’s government is in the early stages of trying to revise Japan’s war-renouncing constitution in order to deploy troops into overseas conflicts more easily.

The prime minister’s words were a measure of the fine line he travels between the continuing need to reassure wary Asian neighbors of Japan’s benign intentions, while speaking to the potent domestic constituency of hard-core nationalists. His carefully couched message did not satisfy them.

Thousands of them skipped Koizumi’s speech to gather at the nearby Yasukuni shrine, a controversial Shinto temple in the heart of Tokyo where the nearly 2.5 million Japanese war dead since 1869 are commemorated — 13 of whom were condemned as Class A war criminals in trials after World War II. The war dead at Yasukuni are worshipped rather than simply remembered, and critics have campaigned to remove the names of war criminals from its rolls.

Koizumi has visited this spiritual home of ultranationalism four times since becoming prime minister in 2001, a far more enthusiastic view of Yasukuni than any of his more cautious predecessors. But the prime minister has never satisfied nationalist demands that he visit on Aug. 15, the anniversary of Japan’s defeat that has become the right-wing’s day to parade its vision of a country that must rise again.

Right-wing demonstrators at the shrine caustically denounced Koizumi for failing to show on this year’s anniversary. But four of his Cabinet ministers did attend, however, provoking a swift diplomatic rebuke from the Chinese government.

“Such negative behavior by a small number of political figures in Japan is deeply regrettable,’’ said Chinese Foreign Ministry spokesman Kong Quan. “We hope Japan would take action to fulfill its promise to face history and repent for its invasions, and not to do things to hurt the feelings of people in China and other victim countries again.’’

Despite a downpour Sunday, thousands of people swarmed over the shrine’s huge pebbled grounds.

Many came simply to honor those killed in battle. But the crowd included hundreds of grim-faced ultranationalists, many dressed in 1930s and ‘40s military uniforms who posed defiantly with the old Imperial flag under which the country’s troops once marauded through Asia.

There were a few critics who came to the shrine Sunday to protest any hint of remilitarization, focusing their fire on Koizumi’s decision to deploy Japanese troops to Iraq. But after a week in which politicians used the anniversaries of atomic bombings of Hiroshima and Nagasaki to issue pleas for peace and denounce a US plan to develop a new generation of nuclear weapons, the Aug. 15 anniversary remains very much a bastion of nationalist expression.

Among those attending the ceremonies at Yasukuni was Tokyo’s powerful Governor Shintaro Ishihara, a popular and charismatic figure among those who reject the politics of atonement. Ishihara told reporters the way to resolve the dispute over Yasukuni is to have the emperor himself visit next year, a brazen suggestion in a culture that does not offer the emperor free advice.

Ishihara said: “If the emperor visits Yasukuni on the 60th year since Japan’s defeat in the war, I believe he can fulfill the great responsibility to the nation that only the emperor can fulfill.’’