(CNN) -- A sheriff's deputy mistakenly thought he saw a teen carrying an assault rifle on a California street this week and shot him dead, authorities said.
It turned out the 13-year-old boy was carrying two fake guns, a replica AK-47 and a fake hand gun, the Santa Rosa County Sheriff's office said.
The Tuesday shooting is being investigated, the sheriff's office said.
School officials in the northern California city of Santa Rosa identified the teen as Andy Lopez Cruz.
"The Santa Rosa City School District family is deeply saddened by the loss of Andy Lopez Cruz," a school system statement said. "This is a tragic event for family, schools and the community. His administrators and teachers will remember him as kind, intelligent and capable."
Two Sonoma County deputies spotted the boy holding what appeared to be an assault rifle Tuesday afternoon, the Santa Rosa County Sheriff's office said.
They pulled over "but maintained cover behind their open passenger door," the press release said.
They yelled at the teen to put the weapon down. He had his back to them and began turning around towards the officers, the statement said.
"One of the deputies described that as the subject was turning toward him the barrel of the assault rifle was rising up and turning in his direction. The deputy feared for his safety, the safety of his partner, and the safety of the community members in the area," the statement said.
A deputy shot the teen. The teen was handcuffed, and the officers called for an ambulance, the statement said. Deputies found the fake rifle on the ground near the boy. The bogus handgun was tucked in his waistband.
Cruz's classmates were crestfallen by the news, Lawrence Cook Middle School Assistant Principal Linsey Gannon told CNN affiliate KRON.
"He was a very popular student," Gannon told the affiliate. "He was a handsome young man with many friends and a lovely family. He will be missed."
Late Wednesday, a crowd gathered in the dirt field where the boy was shot, to hold a memorial that turned into a rally against police shootings, CNN affiliate KGO reported. In the crowd was Cruz's mother who said she was too grief-stricken to talk, KGO reported.
Family friend Gabriel Roque said she was outraged.
"He 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," she told the affiliate. "He was a 13-year-old little boy, you could just tell him to put it down."