Japanese police have formally arrested a man on suspicion of an arson attack on an animation studio in Kyoto last year that killed 36 people, a police spokesman said.

The attack on the well-known Kyoto Animation anime studio was the deadliest violent crime in decades in famously safe Japan, and shocked the country.

Shinki Aoba allegedly broke into the building, "scattered gasoline on the ground floor, set fire to it," and killed 14 men and 22 women, a police spokesman said, confirming his arrest on suspicion of murder.

Mr Aoba, 42, was detained in the immediate aftermath of the July 2019 attack, which also injured dozens of people. But he was hospitalised immediately, suffering serious burns.

He was reportedly unconscious for weeks and police held off charging him until his condition stabilised.

No motive for the attack has been established, with reports claiming Mr Aoba shouted "drop dead" before the assault.

He has reportedly confessed to the arson, and there have been claims that he accused the studio of stealing his work.

In addition to the charge of murdering the 36 people who died in the attack, Mr Aoba faces attempted murder charges over the 34 people who suffered injuries.

He is also charged with possessing knives on the street without legitimate reasons, in violation of Japan's strict laws on weapons.

Mr Aoba is still recovering from his burns, but police have prepared medical treatment facilities at a police station to which he will be sent, public broadcaster NHK reported.