Follow CBSMIAMI.COM: Facebook | Twitter

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

READ MORE: Situation At Matheson Hammock Park In Miami-Dade Heats Up

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: FEMA-Funded South Florida Sites To Administer First Doses Of Pfizer Vaccines

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: CVS, NAACP Team Up To Get COVID Vaccines To People Of Color In South Florida

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.