An FBI agent who is accused of accidentally shooting a man while performing a backflip in a bar can have his gun back, a judge has ruled.
Chase Bishop, 29, was off-duty when he was filmed dropping his gun while dancing. As he picked it up he fired one shot, seriously wounding a man.
Video of the 2 June incident in a Denver nightclub led to his arrest.
On Tuesday a county judge in Colorado - where he is facing a second-degree assault charge - issued the ruling.
During the court appearance in Denver Mr Bishop's protection order was amended to allow him to resume carrying his service pistol both while on and off duty, a spokesman for the Denver District Attorney's office told the Denver Post.
The judge issued the ruling "so long as it is done in a manner pursuant to FBI policy," said the spokesman Ken Lane.
Mr Bishop, who lives and works in Washington DC, was off duty and on vacation when he was filmed at Mile High Spirits, a distillery and dance club in Denver.
Mobile phone video shows him dancing in a circle of people. A gun falls out of his waistband while he does a backflip, and goes off as he picks it up from the floor.
A lawyer for Mr Bishop told the judge that the man who was shot in the leg, Tim Reddington, 24, and his family did not object to the agent continuing to carry his gun.
In an interview less than a month after the shooting, Mr Reddington, who had recently moved to Denver from Chicago, said he did not blame the agent.
"I don't want to blame anybody, throw anybody under the truck," he told ABC's Good Morning America programme.
Mr Bishop's drug and blood alcohol tests, which will not be released, do not warrant any further charges, prosecutors told the Denver Post.
Colorado law prohibits anyone from carrying a gun while under the influence of alcohol.
Lawyers say that a plea deal is being negotiated to settle the assault charge, but did not disclose any details.
According to the FBI website, "agents are to be armed at all times".