Detectives are investigating what they are describing as a "targeted" shooting in Leeds.
The incident happened at 0030 GMT on Monday in Bayswater Terrace, Harehills, when two men entered the victim's house.
A scuffle ensued and a 25-year old man, who was alone in the house, was shot in the leg.
The attackers then fled the scene and the victim was taken to hospital.
The injured man is being treated for a single gunshot wound, which is not thought to be life-threatening.
A West Yorkshire Police spokeswoman said: "We believe the incident was a targeted attack against an occupant in the house.
"It is being treated as an isolated incident."