YouTube screenshot by Elinor Mills/CNET

Barrett Brown, a journalist who has served as an unofficial spokesman for various Anonymous hacking operations, was sentenced Thursday to five years in prison after pleading guilty to federal charges of obstructing a search warrant, making Internet threats and being an accessory to unauthorized access of a protected computer.

The sentencing ends nearly three years of legal wrangling for Brown, who first attracted the attention of law enforcement officials in 2011 when he copied a hyperlink to data stolen in a hack of security think tank Strategic Forecasting, or Stratfor, from one Internet Relay Chat (IRC) channel to another. The hack reportedly yielded 200 gigabytes of data, including e-mails and credit card information from Stratfor clients, which include the US Army, US Air Force and Miami Police Department.

Despite Brown's lack of hacking skills, prosecutors argued that the act of posting a link to the data made him a party to the crime. Seeking to have the charge dismissed, Brown's attorneys argued in a court motion (PDF) that Brown did not "transfer" the stolen data but merely republished a public link to information that was already in the public domain.

Brown's case was closely followed by journalists, civil-liberties activists and Internet activists who worried the case could infringe on freedom of the press by criminalizing the act of linking on the Internet. Brown's previous journalism experience included writing for such media outlets as The Guardian, Vanity Fair and Huffington Post, among others.

"The right of journalists -- or anyone for that matter -- to link to already-public information, including sensitive information, is in serious jeopardy if Brown is convicted," Hanni Fakhoury, a staff attorney for the Electronic Frontier Foundation, wrote in a blog post after the indictment was handed down.

While members of the hacking collective Anonymous tend to hide their faces and identities, Brown took a more public approach. As a spokesmanlike figure for the group, he recorded videos of himself talking and gave interviews to reporters.

He was arrested at his Dallas home in 2012 while he was in the middle of an online chat after posting tweets and videos threatening revenge against an FBI agent associated with the investigation. In one YouTube video, titled "Why I'm Going to Destroy FBI Agent Robert Smith Part Three: Revenge of the Lithe," Brown speaks of ruining the agent's life.

"Robert Smith's life is over," Brown said in the video. "When I say his life is over, I'm not saying I'm going to kill him, but I am going to ruin his life..."

Brown said he targeted the agent because authorities were threatening to charge his mother with obstruction of justice for allegedly hiding a laptop that Brown said he himself hid.

While the hyperlink charge was ultimately dropped, Brown said the prosecution revisited the link charge during a December sentencing hearing as "relevant conduct" that should be considered in deciding Brown's punishment.

"The fact that the government has still asked you to punish me for that link is proof, if any more were needed, that those of us who advocate against secrecy are to be pursued without regard for the rule of law, or even common decency," Brown said in a presentencing statement to the court.

Under a plea deal with prosecutors, Brown was sentenced to 63 months in prison and ordered to pay nearly $900,000 in restitution and fines. He had faced up to eight and a half years in prison after pleading guilty to the charges in April. The two and a half years he has spent in custody will be credited toward his sentence, according to the Dallas Morning News.