(Youtube)

Barrett Brown, a writer once associated with hacktivist collective Anonymous, was sentenced to more than five years in prison Thursday after pleading guilty last year to three federal charges, including transmitting threats and a hacking-related offense.

Brown drew the attention of law enforcement for his ties to members of Anonymous and for sharing a link to public copies of data leaked after a 2011 cyberattack on defense contractor Strategic Forecasting (Stratfor) in a chat room. His case has been closely watched, particularly by many in the civil liberties community outraged that the initial charges against Brown appeared to criminalize the mere act of sharing a hyperlink.

Brown faced over a dozen charges that carried a maximum sentence of more than 100 years in prison at one point, but most of the charges -- including those stemming from sharing the link to Stratfor's stolen data -- were dropped earlier last year.

Under the plea agreement he faced a maximum of 8½ years, but Brown's defense team asked that he be released with time served. Instead, U.S. District Judge Sam A. Lindsay sentenced Brown, 33, to 63 months behind bars and ordered him to pay up to $900,000 in restitution and fines, according to the Dallas Morning News. He will get credit for the two years he has already spent in prison.

"The U.S. government decided today that because I did such a good job investigating the cyber-industrial complex, they’re now going to send me to investigate the prison-industrial complex," Brown said in a statement. "For the next 35 months, I’ll be provided with free food, clothes, and housing as I seek to expose wrondgoing by Bureau of Prisons officials and staff and otherwise report on news and culture in the world’s greatest prison system."

In the more than two years that Brown has been in custody, his case has drawn the attention of press freedom and civil liberties groups such as the Electronic Frontier Foundation, which raised concerns about the government's tactics in pursuing Brown.

At one point, a federal court placed a gag order on Brown and his legal team to stop them from talking to the press. The government also pursued charges against Brown's mother for helping hide her son's laptops from the FBI. His mother, Karen McCutchin, pleaded guilty and was sentenced to probation and a $1,000 fine.

Brown was arrested after posting a series of YouTube videos titled "Why I'm Going to Destroy FBI Agent Robert Smith" in 2012. (Smith was an agent involved with an investigation into Brown's ties to Anonymous. Brown reportedly posted the videos after learning his mother might be facing charges.)

Brown continued to speak out from prison, writing articles for media outlets including the Guardian and the Dallas-based D Magazine, where he wrote "The Barrett Brown Review of Arts and Letters and Jail."

"This breaks down to uploading YouTube videos that contained unfortunate statements, efforts to redact sensitive e-mails that had been procured by hackers, and hiding laptops in a kitchen cabinet," Free Barrett Brown, a group dedicated to his defense, said in the run-up to his sentencing.