Media playback is unsupported on your device Media caption The FBI agent was performing a backflip

A former FBI agent who accidentally shot a man while performing a backflip in a Denver bar has avoided jail after agreeing to a plea deal.

Chase Bishop, 30, admitted third-degree assault and was sentenced to two years unsupervised probation.

Bishop was off-duty when he was filmed dropping his gun while dancing last June. As he picked the weapon up it went off.

Video of the incident went viral on social media and led to his arrest.

"We believe that this agreement strikes an appropriate balance of seeking justice for the victim and ensuring that this type of incident does not happen again," District Attorney Beth McCann said in a statement.

The statement added that Bishop was no longer employed by the FBI.

The victim, Thomas Reddington, is still recovering from a severed artery in his lower leg, his lawyer Bill Marlin told Reuters news agency.

He said Mr Reddington was satisfied with the plea deal, adding: "His concern was about Bishop's conduct and his behaviour after the shooting."

Image copyright Denver Police Department Image caption Video of Chase Bishop's dance moves that ended in the accidental shooting went viral

Mr Reddington said on Friday he held "no personal grudge against Mr Bishop".

"I've done stupid things at bars to impress girls, too," he said, quoted by the Denver Post.

The FBI has not commented on the sentencing.

Last month, Bishop pleaded not guilty to a more serious second-degree assault charge.

He told the court on Friday that his goal in life was to "care, protect and serve people", the Post reported.

"I never expected the result of my actions to lead to something like this," he added.

Bishop, who was based in Washington DC, was on holiday when he was filmed at Mile High Spirits, a distillery and dance club in Denver.

Video showed him dancing in a circle of people. A gun falls from his waistband while he does a backflip, and goes off as he picks it up from the floor. Bishop then walks quickly off the dancefloor.