TOKYO — An alleged arson attack on a respected Japanese animation studio left a shocked nation grieving as investigators on Friday looked to identify victims and determine a possible motive in one of the deadliest acts of violence in Japan’s modern history.

A total of 33 people — many of them young — were killed when a man appeared to douse the Kyoto Animation studio with flammable liquid and set it alight Thursday to trigger an inferno, officials said. Some 36 others were injured, about 10 critically.

Police on Friday identified the suspect in the attack as Shinji Aoba, 41. Public broadcaster NHK said he had no connection with Kyoto Animation and that he was thought to have been living near Tokyo.

The blaze at the production house struck at a pillar of Japan’s anime industry, an obsession in the country and a cherished cultural export. Kyoto Animation, known as KyoAni, had produced such hits as “Lucky Star,” “K-On!” and “Haruhi Suzumiya,” winning worldwide acclaim for its skilled drawings.

Outside the charred shell of the company’s workspace on Kyoto’s outskirts, crowds of well-wishers on Friday left flowers and messages of support for the victims. Many bowed or knelt down and prayed as they offered their respects.

Fans on Twitter used #PrayForKyoani to mourn at least 33 people killed in a suspected arson on July 18 at Kyoto Animation, Co. in Kyoto, Japan. (The Washington Post)

Police investigators, meanwhile, scoured the three-story building. Their probe could result in charges of arson, murder and attempted murder, the Kyodo news agency reported.

The suspect remained hospitalized after suffering burns all over his body, said Hiroyuki Sakai, deputy police chief in Kyoto’s Fushimi ward.

A woman who saw police detain the man Thursday told reporters that he “seemed to be discontented, he seemed to get angry, shouting something about how he had been plagiarized,” according to Reuters. Some reports suggested he told police that somebody had “stolen his novel,” hinting at a revenge motive.

Hideaki Hatta, a co-founder and president of Kyoto Animation, said Thursday that the studio had received threats, including emails threatening murder. He said the attack has “broken our hearts.”

Witnesses said they heard a man yell, “Die!” at startled employees just before the building erupted in flames.

Japanese police identified the man suspected to have started a fire at an animation studio that killed 33 people as Shinji Aoba, public broadcaster NHK said. (Reuters)

The tragedy was the worst mass killing in Japan since 2001, when 44 people died in a suspected arson attack on a gambling parlor in Tokyo.

“We are at a loss to imagine what drove him to commit such an act of extreme violence, if he was the arsonist,” the Asahi Shimbun newspaper said Friday in a commentary.

The Kyoto Animation building did not have sprinklers or indoor hydrants, a fire official told Reuters. But neither of these was required under the fire code because the structure was classified as an office building, Kyoto city fire department official Akane Yamauchi told The Washington Post. She added that an inspection of the building in October found that extinguishers and emergency alarms were installed and that there were no violations.

Violent crime is unusual in Japan. On social media, many people offered condolences and expressed shock at the loss of life. Some posted creative tributes under the hashtag #PrayForKyoani.

Messages of support flowed in from around the world following the disaster, as well as from foreign diplomats in Japan.

Anime experts say Kyoto Animation has earned wide respect from fans for its unique style. A headline in the local press described the company as “Japan’s treasure.”

A GoFundMe page set up by Sentai Filmworks, a Texas-based animation company, had raised $1.3 million for victims and their families by Friday evening in Japan. Pixomondo, another visual-effects company, offered its support. The attack on Kyoto Animation was “an assault on art itself,” CEO Jonny Slow said in a statement.

Crawshaw reported from Hong Kong.