A knife-wielding 15-year-old high school student attacked a police officer at a police box in the city of Ichihara, Chiba Prefecture, on Saturday afternoon, but was shot in the left thigh, police officials said.

According to investigators, the youth, who lives in the city, was quoted as saying he wanted to murder a policeman, grab his pistol and commit suicide. He was arrested on the spot for attempted murder, robbery and obstruction of justice.

Police said they are proceeding with the investigation cautiously in order to determine whether the boy, who is a minor, can be held criminally responsible for his actions. The bullet went through his leg and the injury will take about four weeks to heal, police said.

The 36-year-old senior police officer who was attacked sustained minor cuts to his neck and around his eye during the scuffle.

According to police, the high school student entered the Kokubunjidai police box alone at around 2:40 p.m. and said he wanted advice. When the police officer reached for a memo pad, the youth lashed out at him with three knives that he had hidden in his clothing.

The officer put his hand to his pistol and ordered the youth to freeze, but fired when the youth continued to attack him, police said. The officer was alone at the time of the attack as his partner, a sergeant, was out on a case.