The FBI agent charged with accidentally shooting a man after doing a backflip on the dance floor at a Denver bar last summer will avoid jail time after pleading guilty Friday to third-degree assault.

Under his deal with prosecutors, Chase Bishop, 30, immediately was sentenced to two years probation. He was also fined $1,200 and ordered to pay restitution to the victim. Denver District Judge Karen Brody cited Bishop’s lack of criminal history in her decision to accept the plea agreement.

Bishop had pleaded not guilty last month to a second-degree assault charge in connection with the June 2 incident.

“My whole goal in life is to care, protect and serve people,” Bishop told the judge on Friday. “I never expected the result of my actions to lead to something like this.”

Bishop was off duty and dancing at Mile High Spirits in Denver’s Ballpark neighborhood when he did a backflip as a crowd of people looked on, a video of the shooting shows.

During the flip, his gun fell out of the waistband of his pants. It fired when Bishop bent over and grabbed it off the ground, and the bullet struck a man in the leg. Bishop then put the gun back into his waistband and walked off the dance floor with his hands up.

Tom Reddington, a 24-year-old Amazon warehouse employee, was struck in the leg and suffered permanent injury.

The video quickly went viral.

Bishop, who was in Denver on FBI business when the incident occurred, will serve his probation in Georgia. Brody said she could be receptive to ending his probation after one year if Bishop complies with the terms.

“This is a tragic situation,” Brody said after she announced Bishop’s sentence. “It’s a lesson for everyone: How decisions, when you’re not being conscious of what you’re doing, decisions you make carelessly, with negligence, can turn into really serious consequences.

“I think in the future,” she said to Bishop, “you will never make that kind of mistake again.”

The FBI declined to say on Friday whether Bishop will continue to work for the agency. “It is our standard practice not to comment on personnel matters,” FBI spokeswoman Kelsey Pietranton said.

Reddington spoke emotionally Friday about how that one June night at the bar changed his life. He lost his job at the Amazon warehouse. He has chronic pain in his leg. He doesn’t think he’ll ever be able to run again.

“I have done months of physical therapy,” he said. “I have sought counseling. However, being in public, especially seeing law enforcement with guns, makes me very uncomfortable.”

But, he added, he “holds no personal grudge against Mr. Bishop.”

“I’ve done stupid things at bars to impress girls, too,” Reddington said.

Reddington said he didn’t believe Bishop deserved years in jail for what he did.

“The only thing I’m hoping for,” Reddington said, “Is that he doesn’t carry a gun for a long time.”

Bishop used his brief remarks in court to apologize.

“Mr. Reddington… I’m extremely sorry for everything he’s gone through,” Bishop said.