The school police officer who sparked a massive manhunt after claiming he had been shot by an assailant told detectives that he was responsible for the shooting, a law enforcement official with knowledge of the investigation said Tuesday.

The official, who asked not to be named because the investigation is ongoing, said that Officer Jeff Stenroos told investigators he had accidentally fired a weapon.

Detectives are still trying to unravel exactly what happened during the Jan. 19 incident, when Stenroos claimed he had been shot by a man with a gray ponytail who looked like he was trying to break into cars.

A passer-by found Stenroos lying on the ground and called for help. Hundreds of police swarmed the San Fernando Valley neighborhood and set up a dragnet to try to find the suspect.

Though Stenroos appeared to have been shot in his bulletproof vest and received bruising in the chest area, investigators are not sure if he was wearing the vest when the shot was fired and are treating his accounts with extreme skepticism.

The official said the gun involved in the shooting belonged to Stenroos but was not his service weapon. A 9-mm shell casing was found at the scene and investigators were trying to determine how it got there and if Stenroos was shot outside the high school he was working at or in a different location.

Stenroos has not responded to multiple messages seeking comment and it was not known if he had retained an attorney.

Residents and workers were delayed for hours as they tried to move around the neighborhood and school kids were kept in classrooms without access to food or bathrooms, prompting anger and frustration from parents.