A small fire broke out inside the Yasukuni Shrine compound in Tokyo on Wednesday and police arrested a 25-year-old man in connection with the incident.

The jobless man from Hino in Tokyo told police he was thinking of committing suicide through self-immolation, police sources said.

Several plastic bottles full of what is believed to be kerosene were found near him the man, and police are investigating whether he set the fire.

The man, whose name is being withheld, was arrested for trespassing on the grounds of the war-linked shrine.

The fire was discovered at an altar structure called Chinrei-sha (altar to repose souls) that's dedicated to all of the war victims, both Japanese and foreign, who are not enshrined at the shrine. The flames were subsequently put out.

The main alter of Yasukuni only enshrines people "who dedicated their lives to the state" in Japan's modern wars. Most of them are Japanese soldiers but they also include Class-A war criminals from World War II, most notably wartime prime minister Gen. Hideki Tojo.