A teenager in the Tokyo suburb of Tachikawa, apparently inspired by online video footage of recent gruesome killings of Japanese nationals by the Islamic State extremists, was arrested in February after attempting to kill a goat as "practice" for his plan to kill someone, police said.

According to sources at Tachikawa Police Station, the third-year junior high school student, whose name has been withheld because he is a minor, allegedly crept into a Tachikawa elementary school facility at about 1 a.m. Feb. 15 with the aim of killing a goat kept there.

The boy was arrested by a police officer patrolling the area who heard the goat screaming loudly in the shed where it was kept.

The suspect had a saw and a crowbar when he was caught, the police said.

"I decided to kill someone after viewing videos of the Islamic State, and I wanted to kill the goat kept there for practice," the police quoted the teen as saying.

The access history on a personal computer at his home showed many instances of viewing websites related to the militant group, which had posted videos purportedly showing the beheadings of journalist Kenji Goto and Haruna Yukawa, a self-styled security contractor, in January.

The police said they believe the teen was inspired by the videos.

The boy is now under the care of the Tachikawa branch of the Tokyo Family Court, the police said.