The explosive blaze killed 33 people and 10 more were in critical condition, authorities said.

A man suspected of torching an animation studio in western Japan shouted that he had been plagiarised and appeared to have planned the attack, media said on Friday after a blaze that killed 33 people in Japan's worst mass killing in two decades.

The 41-year-old man "seemed to be discontented, he seemed to get angry, shouting something about how he had been plagiarised", a woman who saw the suspect being detained told reporters.

The unidentified man shouted "Die!" before dousing the entrance to Kyoto Animation headquarters with what appeared to be petrol and setting it ablaze around 10:30 a.m. (0130 GMT) on Thursday, media said.

The fire was put out nearly a day later, at about 6:20 a.m. on Friday, media said.

The explosive blaze killed 33 people and 10 more were in critical condition, authorities said late on Thursday, in the worst mass killing since a suspected arson attack in Tokyo killed 44 in 2001.

Nineteen of the 33 dead had been found, bodies piled up on the staircase to the roof from the third floor, Kyodo news agency said, citing authorities.

Firefighters arriving soon after the fire began found the door to the roof was shut but could be opened from the outside, Kyodo said.

The victims may have rushed up the stairs to escape the blaze on the lower floors and found themselves unable to open the door, it added.

A day later, none of the victims' identities had been disclosed. There were 74 people inside when the fire started, Kyodo said, citing prefectural police.

"I imagine many of the people who died were in their twenties," said 71-year-old Kozo Tsujii, fighting back tears after laying flowers near the studio in the rain on Friday morning. He said he drives by the studio on his daily commute.

"I'm just very, very sad that these people who are so much younger than me passed away so prematurely," he said.

On Friday, police investigators searched the smouldering shell of the building for clues in an investigation that Kyodo said covered suspected arson, murder and attempted murder.

Journalists clustered near the police cordon, while adults walked children to school.

PETROL CANS

A man resembling the suspect went to a petrol station on Thursday with two 20-litre cans, Japanese media said.

Two cans, a rucksack and a trolley were found near the site, and television images showed what appeared to be five long knives laid out by police as possible evidence on the ground outside the three-storey building.

The suspect had no connection with Kyoto Animation and his driver's licence gave an address in Saitama, a northern suburb of Tokyo, public broadcaster NHK said.

Little else was known about the man, who is under police supervision with serious burns to the face and legs, media said.

NHK showed footage of what it said appeared to be the suspect lying on his back as he spoke to a police officer, shoeless and with apparent burns on his right leg below the knee.

When he was detained, he told police, "I did it," adding that he had started the fire because the studio had stolen his novel, Kyodo said, citing investigative sources.

Kyoto Animation, located in a quiet suburb about 20 minutes by train from the centre of Japan's ancient capital, produces popular "anime" series such as the "Sound! Euphonium".

Its "Free! Road to the World - The Dream" movie is due for release this month.

The area surrounding the studio, which sits between two train lines, was cordoned off on Friday morning. A few fire trucks remained there, with their lights off. Some firefighters appeared to still be dousing the smouldering building.

Jun Shin, a 30-year-old Chinese man living in nearby Osaka, visited the site on Thursday night to place flowers near the burnt-out office and say a prayer.

"I am an anime fan," Jun, an information technology worker, told Reuters. "I have watched animation since I was a student, and this was a terrible event, I just want to come and mourn. It left me speechless."