Federal prosecutors are seeking to greatly reduce the prison sentence of a prominent computer hacker they say is responsible for helping stop at least 300 cyber attacks of government and military institutions, and for bringing deeper insight into the global hacking collective Anonymous.

Hector Xavier Monsegur will be sentenced Tuesday in Federal District Court in Manhattan on a series of charges including identity theft, computer hacking and fraud.

He was arrested in June 2011 and pleaded guilty in exchange for cooperating with the Federal Bureau of Investigation (FBI). Although he faces between 21 and 26 years in prison, federal prosecutors say in court documents he “was an extremely valuable and productive cooperator” and should only be sentenced to the seven months he has already served.

Mr. Monsegur was the principal behind LulzSec, an offshoot collective of Anonymous that targeted media companies Fox Entertainment, Nintendo, Sony Pictures, among others. He engaged on a global hacking spree that resulted in the public release of stolen data.

Monsegur, who used the online name “Sabu,” started working with law enforcement immediately following his arrest. According to court documents, he provided real time information that helped the government prevent planned attacks and exposed many of the key players involved in Anonymous, as well as LulzSec and Internet Feds, another splinter group.

“Working sometimes literally around the clock, at the direction of law enforcement, Monsegur engaged his co-conspirators in online chats that were critical to confirming their identities and whereabouts,” prosecutors said. “During some of the online chats, at the direction of law enforcement, Monsegur convinced LulzSec members to provide him digital evidence of the hacking activities they claimed to have previously engaged in, such as logs regarding particular criminal hacks.”

Eight arrests in the US and Europe are connected to Monsegur’s efforts, prosecutors say. Targets of the groups included federal courts, the US House and Senate, NASA, the US military, many private companies and foreign governments, particularly Iran, Pakistan, Turkey, and Brazil.

The greatest coup for authorities was the arrest of Jeremy Hammond of Chicago who was, at the time, the number one most wanted cyber criminal.

Mr. Hammond pleaded guilty to infiltrating major targets and participating in the Anonymous hacking of Stratfor, a private intelligence security firm. Via WikiLeaks, the Stratfor emails were sent to global media companies starting in 2012; they contained a range of damaging information regarding the spying efforts of major US corporations, and US foreign relations.

Hammond was sentenced in November 2013 to 10 years in federal prison.

Monsegur’s cooperation with federal authorities was not known until the Hammond arrest. Since then, he and his family have received threats and remain in hiding. Upon news of his arrest, Anonymous posted an open letter to its former collaborator, saying:

“Sabu snitched on us. As usually happens FBI menaced him to take his sons away. We understand, but we were your family too (remember what you liked to say?) It’s sad and we can't imagine how it feels having to look at the mirror each morning and see there the guy who shopped their friends to [the] police.”

Court documents show that Monsegur played an active role in directing Hammond to attack specific websites, and helped guide the FBI to monitor whether or not he was successful in gaining access.

Sarah Kunstler, Hammond’s attorney, told the New York Times Saturday that Monsegur played a more direct role in the attacks.

“Far from protecting foreign governments, Sabu identified targets and actively facilitated the hacks of their computer systems,” Ms. Kunstler said.