The officers from the Houston Police department were lucky to escape unhurt Thursday after an erratic driver who was pulled over by them opened fire with what was described as an "AK-47-style" rifle.

The Houston Police Department (HPD) shared pictures of the patrol car that was fired upon. The pictures posted on Facebook show that the car's windshield was riddled with bullets. In the accompanying description, authorities said that no one was injured in the incident.

According to KHOU-TV, the shootout took place just before 1 a.m. local time at Bingle Road near Highway 290. The man in question was apparently driving erratically, running red lights, and speeding, prompting the authorities to pull him over.

Police didn't give the name of the driver but said he is a 34-year-old man.

The HPD said that when the authorities gave him a chase, he hurled something toward the deputies before turning south on Bingle road. He then lost control of his car and crashed into a tree and spun around.

The driver then fired at the cops with a short "AK-47-style" rifle through his windshield, Houston PD assistant Chief Wyatt Martin said in a statement. He added that police returned fire and hit the suspect multiple times.

"These officers were very lucky. If you see the front of their vehicle, the suspect was firing from inside his vehicle, and he struck their vehicle numerous times in the hood and in the windshield," Martin said in his statement. "The officers were very lucky that they were not hit."

The suspect driver was shot in the arm and leg and was taken to the hospital. He is expected to survive, KHOU-TV reported.

"Thankfully, like I said, looking at the front of that police car, it's a miracle that neither officer was struck," Martin said.

HPD Chief Troy Finner said that it's simply amazing that no officers were hurt, looking at the number of bullets fired from the weapon. "When you look at the windshields and look at the police vehicle, the amount of bullets from an AK-47 and they're not hurt at all, that's amazing," he added.

Colt M4 Carbine and AR-15 style assault rifles on display during the National Rifle Association (NRA) Annual Meeting in Houston, Texas in May.
Colt M4 Carbine and AR-15 style assault rifles on display during the National Rifle Association (NRA) Annual Meeting in Houston, Texas in May. AFP / Patrick T. FALLON