RANCHO CORDOVA (CBS13) — A tense standoff in Rancho Cordova ended with a man who was an innocent bystander being shot by deputies.

John Sanchez showed the aftermath in his garage where his son was shot by police.

READ MORE: Toro's Single In 9th Sends Mariners Over Athletics

“He was right here, and I think he stepped out to look, and that’s when he got shot,” he said. “They got them marked off; they went right through the paneling and hit my car and they kept going and went out the other side of the wall.”

Deputies responded to Negrara Way on a report that Sanchez’s next-door neighbor, Ben Ledford, was firing up to 100 machine gun rounds at a home across the street, killing a dog inside the house.

Sacramento County Sheriff’s Sgt. Jason Ramos says officers arrived to a chaotic scene.

“It took us some time to figure out exactly who had what role in this incident,” he said.

READ MORE: Sheets Drives In Two, White Sox Hold Off Giants 5-3

Ramos says Ledford surrendered not long after officers arrived, but they spotted Sanchez’s son, Danny, in the garage next door holding what they say looked like a gun. Turns out it was just his cellphone.

“He went right there over to that corner and stood there with his phone, trying to get some pictures,” Sanchez said.

“He found himself in the midst of things and some of his actions were perceived to be threatening to law-enforcement officers,” Ramos said.

Ramos says officers fired several shots, hitting Danny in the leg.

MORE NEWS: Sacramento Metro Fire Ramps Up Fire Resources For Fourth Of July Weekend

“They told him they were sorry that he got shot and everything, that they made a mistake,” Sanchez said.