This @FBI agent was dancing at a Denver bar on Saturday night. Did a back flip, gun falls. He picks it up and a round is fired, hitting a man (he’ll be ok.) @DenverPolice investigating. #9News https://t.co/MwV1WpNzAQ

An off-duty FBI agent accidentally shot a man inside a Denver bar after his gun fell onto the dance floor and unintentionally discharged early Saturday morning, authorities said.

The agent was dancing at the Mile High Spirits bar around 12:45 a.m. when he did a backflip and his gun fell out of his pants, a video of the incident shows.

When he went to retrieve the gun, it discharged, striking another patron in the leg, the Denver Police Department said in a statement.

The victim, a male adult, was transported to the hospital with non-life-threatening injuries, Denver police officer Marika Putnam told BuzzFeed News.

The agent was taken to the Denver police station for questioning and was later released to an FBI supervisor.

Putnam said she did not know if the weapon was a government-issued firearm. Authorities believe the shooting was accidental.

A spokesperson for the FBI did not immediately respond to a request for comment from BuzzFeed News.

The incident is being investigated by the Denver Police Department's homicide unit. The Denver District Attorney's Office will determine whether to file any charges in the incident.