(10-30) 16:15 PDT SANTA ROSA -- The Sonoma County sheriff's deputy who shot and killed a 13-year-old boy who was carrying a toy rifle "feels for the loss of life" but responded properly to a threat, his attorney said Wednesday.

Deputy Erick Gelhaus, a 24-year veteran of the sheriff's office, "absolutely believed it was a real AK-47 and absolutely feared for his life" when he fired eight shots on Oct. 22, killing eighth-grader Andy Lopez Cruz, said attorney Terry Leoni.

"No officer wants to have to use their weapon in the line of duty," she said.

Leoni gave her first statement on behalf of Gelhaus as many community members and protesters continued to express outrage over the shooting and call for the deputy's arrest.

Police officials have said Gelhaus and a deputy he was training pulled up behind Andy, who was holding what turned out to be a replica AK-47 pellet gun in his left hand near his home outside Santa Rosa.

A witness heard Gelhaus yell at the boy twice to drop the weapon, police said. Gelhaus has told investigators that he fired when the boy turned and the barrel of the rifle rose toward the deputies, police said.

Citing the ongoing investigations, Leoni declined to discuss the circumstances leading up to the shooting, including whether Gelhaus had identified himself as a law-enforcement officer before firing.

The other deputy, who had 11 years of experience with two other law-enforcement agencies before joining the sheriff's office, did not fire his weapon during the "rapidly evolving situation," Leoni said.

But both deputies "believed that this was a real AK-47, and they believed that Andy Lopez posed a real imminent and lethal threat," she said.

"The actions by the deputies," she said, "were based on the threat that they perceived and what they perceived as a real AK-47, which has an incredible firing capacity."

Gelhaus is not a "trigger-happy" deputy but a department range master and field training officer who takes pride in teaching other deputies on how to safely use their weapons, the attorney said.

"He is an educator. He is a teacher. He takes his profession very seriously, but beyond that he takes officer safety very seriously," Leoni said.

Leoni said she believed the deputies would be cleared of any wrongdoing after a "fair, thorough and objective investigation."

She added, "But that doesn't lessen the fact that this is a tragedy, and everyone involved feels terrible for the family, the community and the sheriff's department. It's a very difficult situation for everyone."