Police are investigating unnamed agent, who dropped his gun and discharged a round while attempting to retrieve it.

An off-duty FBI agent dropped his gun while dancing at a nightclub in the US city of Denver and shot a bystander trying to retrieve it.

The video of the incident on Saturday, which has gone viral on social media, shows the unnamed agent losing his weapon after completing a backflip. When he goes to retrieve the firearm, he accidentally discharges a round, which hit a man standing nearby in the leg.

According to US media outlets, the victim of the shooting is in good condition at a local hospital.

{articleGUID}

After firing the round, the agent is filmed securing the gun behind his back and apologetically raising his hands before walking away.

According to local media, Denver police are investigating the agent, who was questioned and later released to an FBI supervisor.

An FBI spokesperson said in a statement that “the investigation is active, ongoing and a personnel matter so we cannot provide comment at this time”.

The spokesperson did not comment on the firearm protocol for off-duty agents, CBS Denver reported.

Police are also awaiting blood tests to determine if alcohol was involved in the incident, the local TV station added.

The video has been the subject of shock and ridicule on Twitter with many questioning how a trained FBI agent could lose control of his weapon so easily given the extensive training recruits must undergo in firearm safety.

“FBI agents get 110 hours of instruction and fire their pistols approximately 4000 times during training,” wrote a Twitter user going by the name “The Warax”. According to the FBI’s website, the agency’s firearms curriculum includes about 5,000 rounds of ammunition.

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 pic.twitter.com/MwV1WpNzAQ — Ryan Haarer (@RyanHaarer) June 3, 2018

“Now watch this video of an FBI agent accidentally shooting someone while dancing, and then try to tell me ppl who want to arm teachers aren’t morons.”

Others took issue with the agent’s apparently indifferent reaction to the shooting.

“A FBI agent drops his gun while dancing and shoots someone while picking it up,” wrote activist Jordan Uhl, adding, “he just shrugs it off and walks away, which is pretty much what all cops do when they shoot someone.”

Both gun violence generally and police violence specifically are subject of intense social media debate in the US.