Perez was charged with assault with a deadly weapon on a police officer as well as vandalism.

Authorities said that around 10:45 p.m. Thursday, officers conducted a felony car stop in the 1700 block of West First Street.

They said Perez, who had no involvement in the stop, started hurling glass marbles in the officer’s direction with a slingshot.

Authorities said no officers were struck but that one marbles hit the rear window of a patrol car and caused it to shatter.

It was dark and officers had no idea what had struck their vehicle until they got help from above.

The Orange County Sheriff’s Department helicopter known as Duke came in to investigate, and three men were located, all hiding in a shed. Reviewing in-flight video, officials determined Perez was the marble shooter.

Butler showed the dramatic video police watched to identify Perez.

“Zoom in on him. We need to I.D. him. Yep. Got him,” an officer said.

“Without the helicopter we never have found this guy,” Santa Ana Police Department Cpl. Anthony Bertagna said.

“If one of the officers had been hit with one of those marbles — it shattered a rear window — what would it have done if it hit an officer in the head?” Bertagna asked.