TOKYO — Police on Friday were investigating at the blackened, gutted building in Kyoto where a man raging about theft set a fire that killed 33 people in a beloved animation studio, crushing the hearts of comic fans in Japan and beyond. Some were questioning why mass killings like this are now repeated in the country.

Witness accounts and reports suggested the man had a grudge against Kyoto Animation, but police only have said the suspect Shinji Aoba, 41, who is hospitalized with severe burns and unable to talk, is from near Tokyo and did not work for the studio.

Japanese broadcaster NHK and other media, quoting an unnamed source, said Aoba spent three and half years in prison for robbing a convenience store in 2012 and lived on government support.

The man told police that he set the fire because he thought “(Kyoto Animation) stole novels,” according to Japanese media. It was unclear if he had contacted the studio earlier.

The company founded in 1981 and better known as KyoAni made a mega-hit anime series about high school girls and trained aspirants to the craft.

The shocking attack left another 35 people injured, some critically. It drew an outpouring of grief for the dead and injured, most of them workers at the studio.

Kyoto prefectural police chief Hideto Ueda solemnly laid flowers at the site, now a charcoal shell, vowing for the utmost in the investigation to find motives behind the attack, which he described as “unprecedented and unforgivable.”

While shooting deaths are rare in Japan, the country has had a series of high-profile killings in recent years. Less than two months ago, a man described as a social recluse, or “hikikomori,” stabbed a number of private school children at a bus stop outside Tokyo, killing two people and wounding 17 before killing himself. In 2016, a former employee at a home for the disabled allegedly killed 19 people and injured more than 20.

Nobuo Komiya, a Rissho University criminology professor, calls the attacks “suicidal terrorism,” in which attackers typically see themselves as losers and target their anger to the society, often those who seem happy and successful.

“Feeling angry at people who they think are winners, they tend to choose privileged people as targets,” Komiya said. “They think they have nothing to lose, they don’t care if they get caught or if they die.”

They are part of a growing trend that reflects a change to the Japanese society, where disparities are growing and ties among families, community and other groups have weakened and people are less obligated to follow the rules and be part of it, he said. “Japan shouldn’t be complacent about its safety anymore. We should follow the U.S. and Europe and do more for risk management.”

About 70 people were working inside the 3-story Kyoto Animation No. 1 studio in southern Kyoto, Japan’s ancient capital, Thursday at the time of the attack.

The arsonist arrived carrying two containers of flammable liquid. He shouted, “You die!” as he entered the studio’s unlocked front door, dumped the liquid using a bucket, and set it afire with a lighter, police said, quoting witnesses. Police at the scene confiscated the gasoline tanks, a knapsack and knives, but have not confirmed they belonged to the attacker. A Kyoto police official declined to speculate how Aoba prepared the attack, saying he wanted the man to explain himself, as well as his motives.

The blaze blocked the front door and quickly engulfed the workspace, rising up the stairs to the third floor, sending panicked employees fleeing. Some were able to escape by crawling out of windows, with the help of neighbors. Many tried but failed to escape to the roof, fire officials said. Most of the victims are believed to have died of carbon monoxide poisoning, experts say.

The suspect fled but was chased by studio employees who eventually caught him. He collapsed to the ground outside a house and was quickly surrounded by police.

“They are always stealing. It’s their fault,” he told policemen bending over and asking him why he set the fire, according to a witness who described the scene outside her house. The man complained bitterly that something had been stolen from him, the witness told NHK and other networks.

Neighbors interviewed by Japanese media said the suspect had troubles with other residents in the apartment building in Saitama, north of Tokyo, where he lived.

One man told the broadcaster TBS that he had knocked on Aoba’s door to ask him to stop banging on the walls. He said Aoba shouted “I will kill you!” and “Shut up!” then grabbed him by the hair and shirt.

Studio president Hideaki Hatta was stunned as he entered the site for the first time since the attack Friday, as he joined police investigators searching for more clues to the attack. “I can hardly bear to see this,” Hatta said.

Construction worker Takumi Yoshida, 23, was a fan of KyoAni works. “I am shocked and I’m sure for their families it must be very difficult. So with those feelings in my mind, I brought flowers,” Yoshida said.

Anime fan and university student Yuki Seki traveled from nearby Hyogo prefecture to pay her respects. “After properly recovering while taking their time, I hope Kyoto Animation can once again share their power and energy with us,” she said.

Kyoto Animation’s hits include “Lucky Star” of 2008, “K-On!” in 2011 and “Haruhi Suzumiya” in 2009. It has an upcoming feature film, “Violet Evergarden,” about a woman who professionally writes letters for clients.

It’s also done secondary animation work on a 1998 “Pokemon” feature that appeared in U.S. theaters and a “Winnie the Pooh” video.

It is Japan’s deadliest fire since 2001, when a blaze in Tokyo’s congested Kabukicho entertainment district killed 44 people in the country’s worst known case of arson in modern times. Police called the cause arson, but never announced an arrest in the setting of the blaze, though five people were convicted of negligence.