Westminster Police say Hernandez-Luna displayed a gun and demanded money from the deputy who was using an ATM at the Chase Bank on Beach Boulevard in Westminster Tuesday morning. The deputy then shot at him as he ran away.
The incident prompted an all-out search in Westminster.
Hernandez-Luna was arrested Thursday during a traffic stop in Newport Beach.
The gun has since been recovered.
CNS contributed to this report.