A self-professed white nationalist involved in violence at last year’s rally in Charlottesville pleaded guilty to assault and battery on Friday, prosecutors said.

Christopher Cantwell was arrested after August’s “Unite the Right” rally. Cantwell, who was featured in a Vice news documentary about the demonstrations, became known as the “crying Nazi” after posting an emotional video when a warrant was issued for his arrest.

On Friday, he pleaded guilty to two counts of assault and battery stemming from his dispersal of pepper spray near the University of Virginia rotunda on Aug. 11, the Albemarle County Commonwealth’s Attorney’s Office said in a statement.

The 37-year-old from Keene, N.H., was sentenced to two concurrent terms of 12 months, with all but seven months suspended, freeing him from detention. However, he was required to leave Virginia within eight hours and not return for five years.

He was also fined $250 after pleading guilty to violating the terms of his bond by discussing his victims on social media, according to the statement.

“This outcome brings a measure of finality to the defendant’s dispersal of pepper spray nearly a year ago,” Albemarle Commonwealth’s Attorney Robert Tracci said in a statement. “This agreement was supported by the victims in this case, who have been consulted at each stage of the criminal process.”

Elmer Woodard, Cantwell’s attorney, did not immediately respond to a request for comment.

Several confrontations occurred at the rally, and a counterprotester was killed when a car drove into a crowd. Two state police officers monitoring the protests died after their helicopter crashed.