DENVER (CBS4)– The FBI agent whose gun went off in a LoDo bar appeared in court Tuesday morning where the judge allowed him to have possession of his service weapon.

The Denver DA’s Office officially charged Chase Bishop with second-degree assault, a felony, last month.

Cellphone video shows Bishop, who was off duty at the time, doing a backflip at Mile High Spirits last month and his gun falls out of his waistband. He tries to pick it up and it fires.

A man was shot in the leg by that bullet and survived, but the victim’s lawyer says he was seriously injured.

Bishop, 29, was not arrested when the shooting happened. Instead, he was released to an FBI supervisor.

During the short hearing on Tuesday, Bishop’s lawyer, David Goddard, said prosecutors had offered Bishop a plea deal but didn’t disclose details.

Goddard said that the FBI strongly encourages its agent to carry their guns when they’re not working. Prosecutors didn’t object so Judge Fran Simonet said Bishop could be armed both on and off duty.

Bishop faces a felony charge of second-degree assault, which carries a maximum sentence of 12 years in prison.

In addition to the charges filed by the Denver DA, the FBI could also suspend or fire him.

Bishop was off-duty and on vacation when the shooting happened.

While it’s unclear if the agent had been drinking, Colorado law prohibits anyone from carrying a gun under the influence of alcohol.