Follow CBSMIAMI.COM: Facebook | Twitter

STUART (CBSMiami/WPEC) — A Martin County deputy came under fire during a wild police chase last week.

READ MORE: 120 Opa-locka Residents Evacuated After Gas Explosion Back Home

It began in the city of Greenacres in Palm Beach County after, according to officials, the suspect pistol whipped another man during a robbery.

Deputy Gavin Werner says he is lucky to be alive after a cross county car chase ends with shots fired and a car crash on Friday afternoon.

On Monday, the suspect, Juan Carmenate, is behind bars and Werner decided to share his death-defying story as well as what he was thinking as the bullets came flying in his direction.

One bullet hit the deputy’s unmarked law enforcement vehicle’s door, coming within inches of Werner.

“Yeah, I do feel lucky, luck was definitely on my side,” he said.

Seconds after reportedly shooting at Werner, Carmenate crashed head-on into another deputy’s vehicle, right behind Werner.

READ MORE: Police Investigate Double Shooting In NW Miami-Dade

Werner’s law enforcement instincts kicked in and he got out of his vehicle to pursue Carmenate.

“Our job was to make sure he did not have any means to hurt anyone else so there was no stopping,” Werner said.

Werner and several other deputies surrounded the vehicle with Carmenate still inside and ordered him to get out of the vehicle.

“He was bleeding all over the place, couldn’t move,” Werner said.

Werner says Carmenate eventually fell out of the vehicle and laid on the ground. Werner assisted in the arrest, happy to be alive and able to go home and see his wife.

“I am just glad to be here and everybody is safe and the suspect is in jail,” he said.

MORE NEWS: CDC Issues New Covid-19 Guidance For The Holiday Season

Carmenate faces a laundry list of charges already in Palm Beach County. Martin County officials say they plan to add three counts of attempted murder to that list.