A hacker serving a 10-year prison sentence for stealing files from an intelligence firm was held in contempt of court Thursday for refusing to testify before a grand jury investigating WikiLeaks and its founder, Julian Assange.

Judge Anthony J. Trenga dismissed Jeremy Hammond’s arguments against testifying as “self-serving assertions … without support.” He held Hammond in civil contempt until he testifies or the grand jury in federal court in Alexandria expires.

“It is the basic obligation of every citizen to testify before a grand jury,” Trenga said.

Assange is charged with violating the Espionage Act; he is currently jailed in London while fighting extradition to Alexandria. While a formal extradition request has already been sent, making new charges unlikely, prosecutors have continued to press WikiLeaks associates for information.

Hammond, who six years ago admitted to cyberattacks on various government agencies and businesses, has said he is ideologically opposed to any grand jury probe. He argued that, in Trenga’s words, the government “already has the answers it claims to be seeking,” and the questions were “not asked in good faith.”

However, Trenga said “some questions were directed solely to what only he knows.” While Hammond argued that those questions go beyond the scope of his conviction, Trenga ruled that his plea agreement contains “no provision that restricts the government” from asking him such questions in a grand jury proceeding.

The substance of the questions remains secret.

Prosecutors granted Hammond immunity, so he cannot refuse to testify to avoid self-incrimination. Through attorneys, Hammond argued he was not properly called to testify because a subpoena was not issued. Trenga dismissed that objection as baseless because Hammond is already in federal custody.

Hammond plans to appeal the decision.

“The whole grand jury system of secrecy — it’s past its prime,” his attorney Susan G. Kellman said after the hearing.

A spokesman for Hammond’s support committee said in a statement that “Jeremy made it clear from the beginning of his case that he had no intention of cooperating with the government, and that hasn’t, and will never change. Any attempts to try to force him to testify through prolonged incarceration serves to do nothing but further punish Jeremy for his political beliefs.”

Hammond is currently being held in the Alexandria Detention Center with Chelsea Manning, the former Army intelligence analyst who leaked thousands of classified diplomatic cables and war logs to Assange in 2010. Like Hammond, Manning says she will not cooperate with a grand jury investigation under any circumstances. Trenga has imposed an $1,000 daily fine on Manning for her refusal. Both she and Hammond can be held in civil contempt for up to 18 months; prosecutors could then pursue criminal contempt charges against them.

As part of the Anonymous-associated hacker groups AntiSec and LulzSec, Hammond put online thousands of credit card numbers and records for clients of the firm Strategic Forecasting or Stratfor. He also released personal details of officers at the Arizona Department of Public Safety. Some of the information was published through WikiLeaks.

Court records indicate the Stratfor hack was proposed by Hector Xavier Monsegur, an Anonymous leader who was working as an informant for the FBI.