When "hacktivist" Jeremy Hammond stood in a Chicago federal courtroom seven years ago and explained that his cybercrimes were altruistic acts of civil disobedience, he was cut a break by a judge who chalked it up to youthful folly.

Not this time.

A New York federal judge on Friday sentenced Hammond, 28, to the maximum 10 years in prison for a 2011 hacking spree that exposed confidential and sometimes personal information about law enforcement officers, private intelligence firms and U.S. government contractors and cost millions of dollars in damages. He had pleaded guilty in May.

In a lengthy statement to the court, Hammond, part of a loose band of politically motivated hackers known as Anonymous, said he knew what he was doing was illegal but had become frustrated with the ineffectiveness of peaceful demonstrations.

"I have tried everything from voting petitions to peaceful protest and have found that those in power do not want the truth to be exposed," Hammond said. "When we speak truth to power, we are ignored at best and brutally suppressed at worst."

But U.S. District Judge Loretta Preska drew a sharp distinction between Hammond and activists such as the Rev. Martin Luther King Jr. or Nelson Mandela.

"There's nothing high-minded or public-spirited about causing mayhem," Preska said.

Prosecutors said Hammond hacked into more than half a dozen secure sites to cause what he called "maximum mayhem." His most high-profile hack came in December 2011 when he stole at least 200 gigabytes of confidential information from Stratfor, a private Texas intelligence firm. Thousands of employee emails were released to WikiLeaks and posted over a series of weeks, exposing a host of secret operations Stratfor was conducting, from tracking the Occupy movement on behalf of the U.S. government to corporate spying for heavyweights such as Dow Chemical Co. and Coca-Cola.

One of the hackers who helped set up the takedown of Stratfor — Hector Xavier Monsegur — was working undercover for the federal government, leading to Hammond's arrest at his Bridgeport home in March 2012.

In asking the judge to sentence Hammond to time served, his attorneys noted that three of Hammond's Anonymous co-conspirators who were charged in Ireland and Britain all received less then three years in prison after pleading guilty.

But unlike those hackers, the judge noted, Hammond had a prior conviction for a similar crime. In December 2006 he was sentenced in Chicago to two years in prison for breaking into the website of a conservative activist group and stealing credit card information.

"I still believe in the importance of hacktivism as a form of civil disobedience, but it is time for me to move on to other ways of seeking change," Hammond said in his statement.

As officers escorted him to the lockup, Hammond, with shoulder-length hair and wearing blue jail garb, raised his fist, saying, "Long live Anonymous!"

Tribune news services contributed.

jmeisner@tribune.com | Twitter: @jmetr22b