At a time when North Korea’s erratic behavior has underscored the need for cooperation in Asia, Japan’s delicate ties with China and South Korea have become even more tenuous amid increasing displays of nationalism by the government of Prime Minister Shinzo Abe.

The latest cooling of relations, precipitated by visits over the weekend by several members of the Abe Cabinet to war-linked Yasukuni Shrine in Tokyo, has raised fears Japan will see its regional influence dissipate more as China’s clout grows apace.

This week’s standoff between Japan and China over the Senkaku Islands in the East China Sea, with as many as eight Chinese government vessels cruising in Japanese waters around the disputed islets for hours on Tuesday, has cast a further pall over dealings between the world’s second- and third-largest economies.

With a key election coming up in July, Abe is eager to maintain the backing of nationalist voters, the main supporters of the Liberal Democratic Party, observers say.

On Wednesday, Abe rebutted Chinese and South Korean criticism of his ministers’ visits to Yasukuni, telling a parliamentary session in a defiant tone that his ministers “will not yield to any form of intimidation. . . . It’s natural to uphold the freedom to express feelings of respect to the respected souls.”

South Korea said Monday that Foreign Minister Yun Byung Se had canceled his scheduled trip to Japan this week to protest the visits of three ministers to the Shinto shrine, which honors Class-A war criminals from World War II and millions of Japan’s war dead.

The reaction of Seoul, which appeared particularly offended by the visit of Deputy Prime Minister Taro Aso, the No. 2 man in the Cabinet, surprised Tokyo because Abe, who visited the shrine regularly before becoming prime minister, refrained from doing so this time.

“While in August, when the Democratic Party of Japan was still in power and several Cabinet ministers visited the shrine, the government of then-President Lee Myung Bak did not react as sharply,” a high-level Japanese official said, expressing discomfort with the reaction from the government of new President Park Geun Hye.

China has also registered its displeasure with the Shinto visits, saying that the issue of Yasukuni is connected to whether Tokyo acknowledges its history of militarist aggression and whether it can respect the feelings of the victimized countries.

It did not help that a total of 168 Japanese lawmakers visited the shrine as a group on Tuesday, the largest since 1989, when an interparty league of parliamentarians began keeping records.

The controversial shrine is viewed by Japan’s neighbors as the spiritual backbone of the country’s militarism in the first half of the 20th century. In 1978, it enshrined 14 people convicted as Class-A criminals by the Tokyo war crimes tribunal, including former Prime Minister Gen. Hideki Tojo. Shinto rules also required that the populace worship the emperor as a god.

While some Japanese officials have sought to mitigate the furor among its neighbors, others, including Abe, who is known for his hawkish views, have expressed increasing frustration with China and South Korea.

At a Diet session Tuesday, Abe said the word aggression is not uniformly defined internationally, and that the evaluation of such an act varies “depending on the side from which you look at it.”

Abe also told the Diet on Monday that his Cabinet “has not necessarily inherited” Prime Minister Tomiichi Murayama’s statement in 1995, which unequivocably apologized for Japan’s wartime aggression in Asia. The statement had been endorsed by successive governments for nearly two decades.

Abe’s remarks have further angered Japan’s neighbors, prompting a warning from South Korea’s Park that if Tokyo “turns rightist, its relations with many countries in Asia will become difficult, which is not desirable for Japan as well,” the Yonhap news agency reported.

Japan’s chilly ties with China and South Korea have left some Japanese officials concerned about an unraveling of cooperation among Japan, the United States and South Korea in responding to North Korean threats, the most pressing matter in the region at the moment.

“It is North Korea, which is developing nuclear weapons, that stands to gain from squabbling between Japan and South Korea,” a Foreign Ministry source said. “The United States, our ally, must feel like asking what in the world Japan and South Korea are quarreling over.”

China may also reach out to South Korea to form a united front over the Yasukuni issue, observers say.