An American journalist believed to have ties to the hacking group Anonymous was sentenced to over five years in prison and nearly $900,000 in fines after pleading guilty to three federal charges, including making an online threat and being an accessory to unauthorized access of a protected network, according to media reports.  

Barrett Brown, 33, who has written for The Guardian, Vanity Fair and Huffington Post, was arrested in 2012 for allegedly threatening an FBI agent in a YouTube video. At one point, Brown was facing over a dozen charges that carried a combined sentence of over 100 years, according to media reports. However, the sentence was reduced and most of the charges against him were dropped after he pleaded guilty in April last year.

In a statement read in court on Thursday, Brown reportedly said that he was being unfairly targeted by the U.S. government for merely posting links to hacked material.

“The government exposed me to decades of prison time for copying and pasting a link to a publicly available file that other journalists were also linking to without being prosecuted,” Brown reportedly said.

The link shared online by Brown allegedly contained confidential emails and data, including credit card details, released after the networks of American private intelligence firm Stratfor were breached by hackers in late 2011.

Kevin Gallagher, an activist who is also the director of the Free Barrett Brown campaign, said that Brown’s sentencing had set a dangerous precedent for journalists who used hackers as sources.

“Basically, if you share a link to publicly available material without knowing what’s in it -- maybe it could contain stolen credit card info -- you could be prosecuted,” Gallagher told The Guardian.

In a sarcastic statement released after his sentencing, Brown, who has already completed 31 months of his 63-month prison term, thanked the U.S. justice department for giving him a “prestigious assignment.”

“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. For the next 35 months, I’ll be provided with free food, clothes, and housing as I seek to expose wrongdoing by Bureau of Prisons officials and staff,” Brown reportedly said.