Former Japanese Prime Minister Shinzo Abe says he has visited a shrine viewed by China and both Koreas as a symbol of wartime aggression.

Abe's visit Saturday, which he announced in a tweet, comes days after his resignation. It is his first visit in nearly seven years.

Abe said on Twitter that he visited the Yasukuni Shrine “and reported to the souls of the war dead” that he'd resigned as prime minister.

The shrine is controversial with Japan's neighbors because it honors convicted war criminals among the millions of other Japanese who died in World War II.

The visit will likely be harshly criticized in both South Korea and China.