Video released by police shows two men lighting a firework on a Huntington Park street, and one of them aiming the device directly at officers who are lined up a short distance away in tactical gear.
The officers jump out of the way as the "highly explosive mortar style" firework creates an explosion on the ground only feet away.
Police say the same man also fired the a mortar-style firework at a police helicopter.
Officers arrested Jose Alberto Martinez, 36, a short time after the incident.
The Los Angeles County District Attorney's Office has filed four felony counts of assault on a peace officer and one count of using a destructive device and explosive to injure/destroy.
Martinez is currently being held at the Los Angeles County Jail and faces up to 27 years in state prison if convicted.
The incident happened as local fans were celebrating Mexico's win over Germany on the opening day of the World Cup.