Longtime NASA employee David DeHoyos of Texas says he knew what to do when he heard a burglary suspect downstairs in his house earlier this month.

"I have a firearm. … I keep a pistol, and I grabbed it," DeHoyos said, according to KHOU-TV of Houston.

AUTIN PD RELEASES VIDEOS OF OFFICER-INVOLVED SHOOTINGS THAT LEFT ALEX GONZALES DEAD

The suspect entered the home in Pearland, outside Houston, just after DeHoyos and wife Lisa had gone to bed April 17, he said.

When David went downstairs to investigate, the suspect came at him with a hammer, according to the report.

TEXAS BEAUTY QUEEN REPORTED MISSING 

"I stuck the pistol in his side and I pulled the trigger three times," he said.

At some point during the struggle, Lisa DeHoyos tried to help her husband and wound up struck twice in her head with the hammer, the report said.

Eventually police arrived. Both the couple and the suspect survived, according to KHOU.

The couple each spent several days in a hospital, with David now worried that a broken orbital bone in his face could hurt his ability to remain a photographer for NASA, where he has worked for more than 30 years.

Lisa told Houston’s KPRC-TV she has about 36 staples closing wounds to her head.

GET THE FOX NEWS APP

The suspect, identified as Robert Hebert, faces two counts of aggravated assault with a deadly weapon and one count of burglary, KHOU reported. He remained in jail as of Tuesday on $575,000 bond.