A man involved online in extremist groups was given a two-year probationary sentence with 30 days intermittent confinement Friday in Alexandria federal court.

Brian Baynes, 23, pleaded guilty earlier this year to illegally buying guns as a marijuana user. Another man described by prosecutors as a member of the white supremacist group Attomwaffen Division, Andrew Thomasberg, 21, pleaded guilty to similar charges last week. Thomasberg has yet to be sentenced.

In online chats, according to court records, Thomasberg and a friend with the initials “B.B.” discussed guns, drug use and neo-Nazism online.

“Yo im gonna start tripping again,” Thomasberg wrote at one point. “Psychedelic Nazis.”

B.B. went on to cooperate in the case. Attorneys involved did not officially name Baynes as Thomasberg’s interlocutor, and sentencing papers in Baynes’s case were filed under seal.

A defense attorney said in court Friday that Baynes had moved away from white supremacist views on his own before his arrest in June.

“He was on a path of self-motivated rehabilitation,” public defender Shannon Quill said. “He was at a low point, spending hours and hours on the computer. ... It took him a while to unravel and understand what had motivated or led him to these associations, but he has.”

She said there has “never been any indication” Baynes was “engaging in any violence.”

U.S. District Judge Liam O’Grady said he gave Baynes “credit for stopping on your own.” He added that this was “a real potentially dangerous time for our community because of these associations,” referring to the deadly 2017 neo-Nazi rally in Charlottesville.