AURORA, Colo. -- An off-duty sheriff's deputy under attack managed to fire his gun and made a "one in a billion" shot.

The deputy's bullet traveled up the barrel of a suspect's gun, colliding with the cartridge inside and lodging itself there.

"This collision rendered the .40 caliber pistol temporarily inoperable," according to the district attorney's investigation into the shooting.

The Jefferson County deputy, Jose Marquez, was in the parking lot of his girlfriend's condo in Aurora on Jan. 26 when two people armed with handguns and wearing masks attacked him, the investigation report said.

Marquez later said when the men approached him and he saw at least one was wearing a mask, he knew something "bad" was about to happen and told investigation he thought, "Oh s----, we're getting into a shootout."

He told investigators he thought he was going to die.

The suspects opened fire hitting Marquez twice in the abdomen and once in the shoulder. The shots fractured ribs and damaged his intestines, colon and liver, officials said.

Marquez later told investigators, even after he was shot, he said to himself, "I'm not dying today. Not today. Any other day, maybe. It's not my time yet."

Marquez managed to return fire hitting one suspect, Jahlil Meshesha, in the leg. It was Meshesha's gun that Marquez managed to fire into.

"[The deputy] immediately started screaming, 'I'm an officer! I'm off duty, someone please help,'" resident Kenneth Mitchell told Denver7 back in January. "By the third shot, he had that out and you could hear as he was screaming more and more that he was in pain."

After that, Marquez lost consciousness.

A second suspect fled and still has not been arrested or identified, officials said.

Prosecutors investigating the shooting ruled Marquez acted in self-defense and will not be charged. He has not yet returned to duty, due to his injuries.

Meshesha is facing criminal charges.

--------- Sign up for Denver7 email alerts to stay informed about breaking news and daily headlines.

Or, keep up-to-date on the latest news and weather with the Denver7 apps for iPhone/iPads, Android and Kindle.