A 41-year-old man being held in connection with a deadly arson attack at a Kyoto animation studio has admitted to using gasoline to set fire to the three-story building and indicated that personal grudge was a likely motive, local police said Friday.

The man, identified by the police as Shinji Aoba, has said he torched the studio of Kyoto Animation Co. on Thursday, killing 34 people, as he believed it had plagiarized his ideas, they said.

Investigative sources said when Aoba, wearing a red T-shirt and jeans, was apprehended shortly after the fire broke out at the studio in the city's Fushimi Ward, he alleged that the production company "stole a novel."

Aoba, whose driver's license shows him as a resident of Saitama, near Tokyo, has said he came to Kyoto by train, the sources said.

He is being treated at a hospital for burns to his face, chest and other body parts. It is rare for Japanese police to disclose the identity of a person who has not yet been formally arrested.

Related coverage:

Most victims of Kyoto blaze found on stairs to rooftop

33 dead after man sets fire to Kyoto anime studio

Grisly details revealed as Kyoto anime studio fire victims taken to hospital

His association with the company, known internationally for producing a number of popular animation works, has not been independently verified and the police plan to question him after his condition improves.

Many victims of the studio fire are believed to have tried to escape the inferno by climbing up to the roof but were unable to open the door. They are believed to have died from carbon monoxide poisoning.

The death toll from the fire, which was finally extinguished at 6:20 a.m. Friday, is among the worst in recent decades in Japan. More than 30 people were also injured.

About 70 people were inside the studio when the suspect burst through the entrance on the first floor around 10:30 a.m. Thursday and started the fire.

Most of the 34 people who died in the attack were found on stairs leading to the building's rooftop, police and firefighters said Friday.

Nineteen victims were found collapsed on the stairs connecting the third floor to the rooftop and the door at the top was closed when firefighters arrived.

In addition to the 19 victims found in the stairwell leading to the roof, 11 were found dead on the second floor, two on the first floor and one on the stairs between the second and third floors, the police said. The location where the 34th victim, whose death was confirmed Friday, had been found was not immediately known.

Aoba entered the building screaming "Die!" and immediately splashed a flammable liquid from a bucket before setting it ablaze, according to the police.

They believe he was the man who was witnessed buying gasoline from a gas station near the site on Thursday morning and that he carried two 20-liter cans to the studio on a cart.

According to the investigative sources, he robbed a convenience store in Ibaraki Prefecture, northeast of Tokyo, in 2012 and was sentenced to three and a half years in jail. Following his release, as he had a mental illness, he was allowed to be part of a government welfare program for former inmates.

The police are also investigating reports of sightings of a man wearing clothes similar to Aoba's in a park, where they found possible evidence such as an empty box which they suspect may have contained one of the gasoline cans.

Local residents have told police officers that around 1 p.m. on Wednesday a man who appeared to be Aoba was lying on a bench in the park 500 meters away from the studio.

They are also looking to see if there is any relation with a man who was lying on the same bench at 8 a.m., two and a half hours before the fire occurred.

The police conducted an investigation Friday at the burned building in order to establish their case on charges of arson, murder and attempted murder.

The police believe Aoba planned to cause massive deaths and casualties and the fire was premeditated. Knives and a hammer were discovered at the scene but the police say they do not seem to have been used.

All who died are believed to be studio employees, the police said. As of March, Kyoto Animation had 165 employees with an average age of 33, according to its website.

In October, a violent threat was posted on Kyoto Animation's website and the company filed a report with the police, who have been investigating it as forcible obstruction of business but they do not know if there is any connection to the fire.

On Friday, many people, both Japanese and foreigners, came to offer prayers and flowers near the studio, where charred shelves and paper could be seen scattered inside through broken windows.

"I still can't sort out my feelings and I can't get over it," said a 27-year-old woman who came from Nagoya after learning of the incident.

A 71-year-old man working near the site said he walked past several Kyoto Animation employees Thursday morning. "I feel really sorry for them," he said tearfully.

Kyoto prefectural police chief Hideto Ueda also offered flowers and called the arson an "unprecedented, unforgivable crime," while pledging a thorough investigation into the motive and background of the attack.

Kyoto Animation, known also as "KyoAni," has produced popular TV animation series including "K-On!" and "The Melancholy of Haruhi Suzumiya" (Suzumiya Haruhi no Yuutsu), which depict the daily lives of high school girls.

Its works have prompted many fans to visit areas associated with them and promoted local tourism.

A former school building in Toyosato, Shiga Prefecture, attracted 100,000 visitors in a year at its peak as the school in "K-On!" is said to be modeled on it.