Authorities in Virginia are investigating a home invasion that they say ended in a shooting

Deputies from the Frederick County Sheriff’s Office responded to a home on Klines Mill road around 4.A.M Thursday for reports of and unwanted man in on someone’s porch.

When the deputies got there, officials said the man ran around to the back of the house, and forced his way through a locked door.

Once the intruder was inside, the resident shot him, authorities said.

They said the intruder and the homeowners know each other, however they are not family.

“We’re still investigating it, but the subject felt that himself and the others in the home were in danger so he discharged his firearm,” said Captain Donald Lang, of the Frederick County Sheriff’s Office.

Lang said it’s legal in Virginia to use deadly force in self defense.

No charges have been filed, and Lang says the intruder in in critical condition at the UVA hospital.