Investigators say the suspect locked a woman and her two children in a bathroom while robbing the family.
The woman had the presence of mind to find a way to identify the man.
ORIGINAL STORY: Home intruder locked women, 2 kids in bathroom before shooting man
She calmly offered him a water bottle, he took a drink of it, and that is how authorities were able to catch him, according to court documents.
22-year-old David Gardner appeared in court Wednesday night.
Three weeks ago, investigators say Gardner forced his way into the family's apartment on Ella in north Harris County and the pushed the mother and her kids into the bathroom.
He was wearing a Spider-Man-like face mask, so no one got a good look at his face.
While the woman and kids were locked in the bathroom, investigators say Gardner robbed the husband, shot and killed him, then took off.
When deputies arrived, the masked man was gone, but the woman mentioned she had a bottle of water he had held and taken a drink from.
Investigators recovered fingerprints from the bottle and used them to identify Gardner.
Gardner was out of jail on bond for evading arrest and unauthorized use of a motor vehicle at the time of the deadly robbery.
Follow Courtney Fischer on Twitter and Facebook.