The Sonoma County, California, sheriff’s deputy who fatally shot 13-year-old Andy Lopez will not be prosecuted for the killing, a district attorney ruled on Monday.

Lopez was shot and killed on Oct. 22, when Deputy Erick Gelhaus mistook the teen’s toy AK-47 for an actual assault rifle. According to Santa Rosa police, Gelhaus and another deputy were patrolling the neighborhood when they saw Lopez.

Authorities say Lopez's back was turned away from them, and they didn't realize how young he was. When Lopez did turn around, they saw the barrel of a gun pointed toward them. According to police, the deputies feared the toy gun was an assault rifle. Gelhaus then opened fire on Lopez, shooting him seven times.

In an interview with KTVU-TV, shooting witness Ethan Oliver said he saw officers fire shots into Andy Lopez after the teen had fallen to the ground.

A nine-month investigation into the shooting was launched by the FBI, and Gelhaus and the second deputy were put on administrative leave.

During a news conference on Wednesday afternoon, police displayed a real assault weapon and the "air soft" carried by the teen -- shown in the photo above -- to show how closely the replica gun resembled a real assault rifle. But residents of the Santa Rosa community say officers should have been able to tell the difference between the two.

Following a review of the case, though, a district attorney ruled on Monday that Gelhaus would not be prosecuted, reports KTVU.

"While this was absolutely a tragedy, it was not a criminal act," Sonoma County District Attorney Jill Ravitch said.

As part of their investigation, police discovered that the orange tip usually found on toy rifles had been removed from the pellet gun being used by Lopez. This then led Gelhaus to think the toy was an actual assault rifle.

The deputy "fired his weapon in response to what he honestly and reasonably believed was an imminent threat of death to himself or others," Ravitch said.

In a statement released by their lawyer, Arnoldo Casillas, Lopez’s parents shared their disappointment in the ruling. "This disheartening decision leaves the family feeling as though Andy had been killed again today," Andy's parents said.

They added that the ruling was “impossible” to accept, and it felt like their son “had been killed again.”

Numerous marches, rallies and protests were held in memory of the junior high school student following the shooting. Prosecutors said on Monday that they planned to meet on Tuesday. Santa Rosa residents have scheduled several upcoming marches to protest Ravitch's ruling.