The attackers kicked in the front door to the southwest Houston home, roughed up the resident, then placed him in an upstairs closet.
But that holding place was where the resident kept his gun.
He would soon use it on one of the intruders, exchanging gunfire and sending the man to the hospital Tuesday afternoon, Houston police said.
The resident told police he was upstairs at the home in the 8200 block of Braeburn Valley Drive, south of Houston Baptist University, when three men kicked in the front door about 2 p.m. Tuesday.
The intruders attacked him and placed him in a closet, so they could ransack the home, said Sgt. Jerri Brandon with the Houston Police Department.
When he thought the intruders were gone, the man left the closet, armed with a gun that he kept there, he told police.
Downstairs, he encountered one of the men and the two exchanged gunfire, police said.
The resident, who lives at the home with his parents, was not injured.
1 wounded, others flee
The intruder, who appeared to be in his 20s, was shot in the shoulder and leg. He ran down the street and collapsed, police said.