A SELF-DESCRIBED anarchist and "hacktivist" in the US was sentenced to 10 years in prison yesterday for illegally accessing computer systems of law enforcement agencies and government contractors.

Prosecutors said the cyber attacks were carried out by Anonymous, the loosely organised worldwide hacking group, and that participants stole confidential information, defaced websites and temporarily put some victims out of business.

Jeremy Hammond (28) was caught last year with the help of Hector Xavier Monsegur, a well-known hacker known as Sabu who helped law enforcement infiltrate Anonymous.

More than 250 people, including Daniel Ellsberg, who famously leaked US Defence Department documents during the Vietnam war, wrote letters of support for Hammond.

His lawyers had asked that he be sentenced to time served, 20 months. But Judge Loretta Preska said Hammond's previous hacking conviction and arrests for other smaller crimes demonstrated his disrespect for the law. She also said she was imposing the sentence sought by prosecutors because his own words from online chats revealed his motive was malicious.

Hammond told the judge he hacked into law enforcement-related sites in retaliation for the arrests of Occupy Wall Street protesters.

"Yes I broke the law, but I believe sometimes laws must be broken in order to make room for change," he said.

Hammond's "motivation was always to reveal secrets that he believes and still believes the people in our democracy have a right to know", the defence wrote in court papers.

In its court filings, the US government said Hammond had a previous hacking conviction and "caused harm to numerous businesses, individuals and governments, resulting in loses between $1m (€740,000) and $2.5m (€1.85m)."

A criminal complaint said Hammond took information of more than 850,000 people via his attack on Strategic Forecasting Inc, a publisher of geopolitical information also known as Stratfor. He also was accused of using the credit-card numbers of Stratfor clients to make charges of at least $700,000 (€519,000).