Villegas was later detained and admitted to being the shooter, police said.