Three men are facing charges after a violent home invasion in Markham on Thursday where one person was injured and a handgun went off during a struggle, York Regional Police say.

Just after midnight on Thursday, police say they were called to a home on Snow Creek Street, near 16th Avenue and Donald Cousens Parkway, for a report of a home invasion.

They arrived to find six victims in the home, one of whom was suffering from non-life-threatening injuries.

Investigators say that a short time earlier, three men brandishing handguns allegedly barged into the home through the back door.

Two occupants of the home got into a fight with one of the suspects, who allegedly pistol-whipped one of them in response.

The suspect’s gun then discharged but did not strike anyone.

“The suspects searched the home then fled in a vehicle,” investigators said Friday.

Police then located a car matching a description of the suspect vehicle and pulled it over in the area of 16th Avenue and Cairns Drive.

Three men inside were arrested.

Police identified them as 23-year-old Rayan Abdu of Mississauga, 21-year-old Liban Muhumed of Mississauga and 22-year-old Yaphet Fassil of Newmarket.