A man screaming "You die!" burst into an animation studio in Kyoto, doused it with a flammable liquid and set it on fire Thursday, killing 33 people in an attack that shocked anime fans across Japan and beyond.

Most of the dead and the 36 injured, some critically, were workers at Kyoto Animation, known for mega-hit stories featuring high school girls, with places featured in the stories even becoming "pilgrimage sites" for their fans.

Kyoto police said the suspect was injured and taken to a hospital for treatment. They are investigating the man, who is 41 and not a company employee, on suspicion of arson, police said. They gave no immediate details on the motive.

The fire started in the three-story building in Japan's ancient capital after the suspect sprayed an unidentified liquid accelerant, Kyoto prefectural police and fire department officials said. Japanese media reported the fire might have been set near the front door, forcing people to find other exits and possibly delaying their escape.

Firefighters found 33 bodies, 20 of them on the third floor and some on the stairs to the roof, where they apparently collapsed while trying to get out, Kyoto fire official Hayashi Kazuhiro said. Two were found dead on the first floor, 11 others on the second floor, he said.

A witness who saw the suspect being approached by police told Japanese networks that the man admitted spreading gasoline and setting a fire with a lighter. She told NHK public television that the man had burns on his arms and legs, and that he was angrily complaining that something of his had been "stolen," possibly by the company. NHK footage also showed sharp knives police had collected from the scene, though it was not clear if they belonged to the suspect.

Survivors who saw the attacker said he was not their colleague and that he was screaming "[You] die!" when he dumped the liquid and started the fire, according to Japanese media. They said some of the survivors got splashed with the liquid.

Kyoto Animation, better known as KyoAni, was founded in 1981 as an animation and comic book production studio, and its hits include "Lucky Star," ''K-On!," and "Haruhi Suzumiya." The company does not have a major presence outside Japan, though it was hired to provide secondary animation work on a 1998 "Pokémon" feature that appeared in U.S. theaters, as well as a "Winnie the Pooh" video.

"Why on earth did such violence have to be used?" company president Hatta Hideaki asked, as he condemned the attack. Mr. Hatta said his company has received anonymous death threats by emails in the past but responded "sincerely" each time, though he was not linking them to Thursday's attack.

Anime fans expressed anger, prayed, and mourned for the victims at Kyoto Animation on social networks. A cloud-funding site also started up to help the company rebuilt.

Witnesses said they heard bangs coming from the building. Others said they saw people coming out blackened, bleeding, and walking barefoot, Kyodo News reported. Rescue officials set up an orange tent outside the studio building to provide first aid and sort the injured.

"There was an explosion, then I heard people shouting, some asking for help," a female witness told TBS TV. "Black smoke was rising from windows on upper floors, then there was a man struggling to crawl out of the window."

Fire department officials said more than 70 people were in the building at the time of the fire, and many of them ran outside.

The death toll exceeded a 2016 mass killing in which a man stabbed and killed 19 people at an assisted living facility in western Tokyo.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

A fire in 2001 in Tokyo's congested Kabukicho entertainment district killed 44 people in Japan's worst known case of arson in modern times. Police never announced an arrest for setting the blaze, though five people were convicted of negligence. In 2008, 16 people died in a blaze at a movie theater in Osaka, near Kyoto.

This story was reported by The Associated Press.