China has summoned Japan's ambassador and delivered a "strong protest" after Japanese Prime Minister Shinzo Abe visited a controversial shrine.
The official Xinhua news agency quoted China's Foreign Ministry as saying the visit glorified Japan's history of militaristic aggression.
Yasukuni is believed to be the repository of around 2.5 million of Japan's war dead, including several high-level officials executed for war crimes after World War II.
Foreign Ministry spokesman Qin Gang said Foreign Minister Wang Yi conveyed the Chinese government's solemn condamnation and strong protest.
"The Chinese government expresses strong outrage and protest and solemnly condemns Japanese leaders ruthlessly trampling the feelings of Chinese people and people of other war-affected Asian countries and bluntly challenging historical justice and human conscience," Qin said.
Gang urged Japan to "correct its error" immediately.
"We solemnly urge Japan to abide by its commitment to reflect on its history of aggression, take measures to correct its error, eliminate the adverse effects, and take concrete actions to win the trust of its Asian neighbors and the international community," he said.
Abe's visit to the Yasukuni shrine -- the first by an incumbent Japanese prime minister since 2006 -- further raised tensions which are already high over disputed islands in the East China Sea.
South Korean government spokesman Yoo Jin-ryong also said Seoul "cannot withhold its regret and anger" over the visit. Korea was occupied by Japan during the war.
"Despite concerns and warnings from neighboring countries and the international community, Japanese Prime Minister Shinzo Abe on Thursday, December 26, made a visit to the Yasukuni Shrine, which beautifies the historical colonization and invasive war as well as enshrines the war dead. We cannot withhold regret and anger over the visit," Yoo said.
China, Japan, and South Korea are engaged in a number of territorial disputes in the East China Sea.
The U.S. Embassy in Tokyo issued a statement expressing disappointment "that Japan's leadership has taken an action that will exacerbate tensions with Japan's neighbors."
Based on reporting by AFP and AP