Provo • A former Utah County gym teacher accused of slamming a 14-year-old student into a wall took a plea deal Monday that will allow him to avoid jail time if he stays out of trouble.

Anthony Robbie Chidester, 41, pleaded guilty as charged to second-degree felony child abuse Monday. But as part of a plea deal, Chidester’s charge will be reduced to a misdemeanor after two years if he completes anger management classes, performs community service and commits no new crimes.

It was a last-minute deal made ahead of a trial that was expected to start this week.

Chidester admitted Monday that while he was a teacher at Rockwell Charter High School, he pushed a teenager against a wall and slammed the youth into the ground. The boy was left with bruising and redness on his arms and back after the April 18 incident.

Chidester on Monday apologized to the victim, who was sitting in the courtroom next to his mother.

"I made a horrible mistake," Chidester said, "that I've regretted every second of every day since."

Deputy Utah County Attorney Craig Johnson said this was the first time Chidester has taken responsibility for what happened since he was charged more than six months ago.

Johnson said that it was important to his office that Chidester admit to a felony, saying that video footage of the event showed a violent encounter where Chidester pushed the teen against a wall, slammed him to the ground and then held the student down with his knee.

"That is really violent conduct," he said, "that rose to a felony."

Chidester was fired from his job as a physical education and health teacher after the assault. The incident escalated, authorities say, after Chidester told the boy to put a basketball away and the teen didn’t put it away quickly enough.

While Chidester was apologetic Monday, he previously released a statement saying he is threatened and bullied by students every day he works. He said that while it doesn’t excuse his behavior, he said he doesn’t “think people realize the conditions that we have to teach in.”