HORSEHEADS, N.Y. -- An 18-year-old was shot and badly injured after police said he burst into a Horseheads home with two other people, demanding cash.

Deputies said Daiquan Bythwood, Zhamere Charriez of Elmira and Drew Stansfield of Horseheads had a loaded rifle and broke into a home on Overlook Drive around 11:30 p.m. Wednesday. Deputies said an occupant of the home then struggled with Bythwood before the homeowner shot Bythwood with a rifle. All three suspects then left, deputies said.

Bythwood was then taken to an Elmira hospital, then one in Sayre, where he went through emergency surgery and was listed in critical condition.

Charriez, 17, was later picked up in Elmira, charged with robbery, and taken to the county jail. Stansfield, 19, was taken into custody by the Chemung County Sheriff's office Thursday night.

The homeowner was not immediately facing charges in connection with the shooting, but the district attorney's office will investigate and determine if self-defense is a justification in the case.