The Tokyo High Court on Tuesday upheld a lower court ruling that sentenced a South Korean man to four years in prison in connection with an incident that damaged a lavatory at the war-linked Yasukuni Shrine in 2015.

Chon Chang-han, 28, damaged the ceiling of a visitor's restroom after igniting a gunpowder-filled metal pipe on Nov. 23, 2015. He also brought gunpowder with him when he re-entered Japan on Dec. 9 the same year, according to Tuesday's ruling.

While Chon's defense argued that his sentence, delivered initially by the Tokyo District Court last July, was too severe, the high court ruled that it was a highly dangerous and vicious crime, and that no error was found in the district court's ruling.

Presiding Judge Toshiaki Fujii also said in Tuesday's ruling that it was sheer luck that no one was injured in the incident.

Regarding his motive, Fujii said Chon thought he would draw public attention and high praise through his action, and that there was no political motive behind it.

The Shinto shrine in Tokyo is not only dedicated to Japan's war dead but also enshrines Japanese wartime leaders who were convicted as war criminals in a post-World War II international tribunal.

It is often seen as a symbol of Japan's militarist past by countries that suffered under Japanese occupation or colonial rule before and during the war.