An off-duty FBI agent accidentally shot a man while dancing at a nightclub in Colorado, police say.

Cell phone video shows the unidentified agent at a club in downtown Denver Saturday night.

In the video, you can see a gun falling from the agent’s waistband holder as he dances and does a backflip.

When the agent goes to pick up his gun from the floor, it accidentally fires.

Authorities say a man in the crowd was shot in the leg and taken to the hospital. He is expected to be okay.

The FBI agent was questioned by Denver police and released to an FBI supervisor.