A man was shot and killed by police  late Wednesday during a traffic stop in Clayton County after police said the man pulled a gun and shot the driver of the car in which he was a passenger.

The bizarre chain of events began around 10:45 p.m. when Clayton County police officers stopped a 2009 Toyota Corolla on Mt. Zion Road near Tara Boulevard.

One of the five people inside the vehicle had a warrant for his arrest, according to police.

The officers got the five people out of the car, and while they were patting them down, the wanted man “began to reach around his waistband,” and pulled out a handgun, according to Clayton County police Sgt. Otis Willis III.

“A struggle ensued, and during the time he pulled his weapon out and was firing, he fired and struck the driver of the vehicle he was in,” Willis told Channel 2 Action News.

An officers then returned fire, killing the gunman.

One of the other passengers fled during the gun battle, and the other two passengers were taken into custody for questioning.

One of the officers was also injured during the fight, but police have not said how the officer was injured.

The driver of the vehicle was taken to a hospital for treatment of a gunshot wound to the stomach, Channel 2 said.

The conditions of the driver and the injured officer were not immediately available.

The Georgia Bureau of Investigation is investigating the incident.