An off-duty FBI agent accidentally shot a man at a Denver nightclub on Saturday (June 1) when his gun fell out of his waistband holster as he was doing a back flip while dancing.

The incident, which was caught on video and shared on Twitter by a local news reporter, shows the man’s gun fall to the ground after he does a back flip. As the man reaches for the gun, it discharges, hitting another person in the leg.

The man is then seen tucking the weapon back into his waistband, raising his hands and walking away from the crowd. According to the local media, the person who was shot is hospitalized with a “good prognosis.”

The club was evacuated a few minutes after the incident and the club has since said it will start using metal detectors, the station reported.

Charges will be determined by the Denver District Attorney’s Office, and the Denver Police homicide unit is conducting an investigation.