The shooting happened Tuesday around 3 p.m. Two Sonoma County sheriff's deputies were patrolling near Mooreland Avenue and West Robles Avenue. Police said they saw Andy Lopez with what they thought was an assault weapon. Police called for backup and ordered Lopez to drop the weapon. Police said he did not drop it and they fired at him several times.
"He was holding it in his left hand, he turned toward his right, and in doing so moved the gun toward the deputy, and in his mind, he was fearful he would be shot," said Santa Rosa Police Lt. Paul Henry.
Lopez died at the scene.
"He's was a 13-year-old boy who was no harm to anybody. This was not a grown man walking down the street with a gun. He was a 13-year-old little boy, you could just tell him to put it down," said Lopez's friend Gabriel Roque.
Investigators said the gun resembled an assault weapon, like an AK-47. It's not clear if it was a working pellet or BB gun. They say they also found a plastic handgun in the boy's waistband.
Ismael Mondragon saw the boy carrying the rifle and warned him to put it away. He saw the events unfold in his rearview mirror.
"He pull over to the kid just walking and opened the door and shoot him, thre shots," Mondragon said. "I did not hear anything like [a warning]. I am 50 feet away but I am stopping as I am watching."
The deputies who shot the boy are on leave. Santa Rosa police, Petaluma police and the district attorney's office are investigating the shooting.
The Sonoma County Sheriffs Department issued a statement Wednesday from Sheriff Steve Freitas saying, "As a father of two boys about this age, I can't begin to imagine the grief this family is going through. This is a tragedy on many levels."
There was a huge turnout Wednesday night for a memorial that turned into a rally against lethal force by law enforcement. The boy's mother said she was so sad and couldn't talk publicly. The community came to rally around the parents of the teen.
"That could have been my son out there. It's terrible, I think we need justice for him," said Santa Rosa resident Esmeralda Nunez.
Guerneville resident Greg Kestel, who attended the rally, told us the teen was killed "...in cold blood I think and I mean, again it depends on circumstances, but they didn't have to shoot him I don't think."
This is the third fatal shooting by Sonoma County sheriff's deputies this year. The deputies are on administrative leave.
ABC7 News reporter Heather Ishimaru contributed to this report.