SANTA ROSA, Calif. - A 13-year-old California boy carrying a replica of an assault rifle to a friend’s house was shot and killed by a sheriff’s deputy who believed the gun was real, authorities said.

The incident took place in Santa Rosa, Northern California, on Tuesday, a day after a 12-year-old boy killed a teacher at a Nevada middle school with a gun he also used to take his own life.

The Santa Rosa boy’s father said his son, Andy Lopez Cruz, a middle schooler who played the saxophone and liked basketball and boxing, was shot while on his way to a friend’s house with a pellet gun left at the family home over the weekend.

“It’s not right what they did to my son,” said the father, Rodrigo Lopez, as he sat with friends and family on Wednesday outside Santa Rosa City Hall in a quiet protest.

Lieutenant Paul Henry, who is investigating the incident for the Santa Rosa Police Department, said two Sonoma County Sheriff’s deputies had been patrolling a street near the boy’s home on Tuesday when they saw him walking with what appeared to be an assault weapon in his left hand.

One of the deputies, who did not immediately realize that the person he was seeing from behind was a child, shouted twice: “Put down the gun,” according to Henry and a police statement.

“The subject turned toward the deputies, and as he was doing that the barrel of the weapon was rising toward the deputies,” Henry said. The deputy then fired rounds, killing the boy.

The incident took place against a backdrop of growing concern about officer-involved shootings in California, where a spate of such incidents in the city of Anaheim, southeast of Los Angeles, prompted protests in 2012. Concern over seven fatal officer-involved shootings in three years in Sonoma County prompted calls in 2000 for a civilian review board, but none was established.

REAL OR FAKE?

Displaying a real AK-47 next to the plastic one recovered from the scene, Henry pointed out the similarities in their appearances. The pellet gun was shorter, and lacked a bright orange piece meant to mark it as a toy.

Pellet guns, which use compressed air or other gases to fire pellets or spherical balls, are sometimes made to resemble assault weapons. Police also found a plastic handgun tucked into the boy’s pants.

“It’s a tragic event,” Henry said. “It’s tragic for the family, the community and the deputies.”

According to friends and family, Andy Lopez had a good sense of humor and liked to tease his friend Luis’ older sister, Ana.

But he also appeared to have had some difficulties. According to his father, he was expelled from Lawrence Cook Middle School in Santa Rosa. On Tuesday, he had been sent home early from his new alternative school, for what his parents described as lingering too long at a local store during a break.

Later in the afternoon, his father said, Andy took the pellet gun, which had been left by another child, and made plans to see his best friend, Luis Diaz. When Andy did not return home later in the day, the family called the Diaz home and learned that he had not arrived there.

Rodrigo Lopez said he then stepped outside, saw the police cars and commotion and eventually realizing that the unmoving body on the ground was that of his son.

The officers involved in the shooting have been placed on administrative leave, which is standard procedure, and the incident is being investigated by the Santa Rosa Police Department and other law enforcement agencies, officials said.