U.S. military leaders in Japan advised against a planned visit by some of their troops to war-linked Yasukuni Shrine in early April, before President Barack Obama's visit to Tokyo, apparently out of consideration to South Korea and China, an American military source said Saturday.

U.S. Forces Japan headquarters warned against the visit to the controversial shrine by more than 20 troops, leading to the trip's cancellation, according to the source.

The Shinto shrine honors past Japanese leaders convicted as Class-A war criminals, along with millions of war dead. Beijing and Seoul consider it a symbol of Japan's past militarism and wartime aggression and bristle when Japanese politicians make state visits viewed as glorifying the war.