After Swartz's suicide in January, his family and friends accused the Department of Justice of cracking down too hard on him. At the time of his death, Swartz, 26, was facing a potential prison sentence and felony charges for allegedly illegally accessing articles from a database.

In a Senate judiciary committee hearing on Wednesday, Holder expressed sympathy to Swartz family and friends but said the case was a "good use of prosecutorial discretion."

Swartz was arrested in January 2011 on 13 felony charges, for downloading academic articles from the JSTOR database and make them freely available. He faced a potential prison sentence of up to 35 years.

But Holder said that before the indictment, prosecutors had offered a plea deal to Swartz that would have resulted in a three-month sentence. Further deals were offered for increasing amounts of time up to six months, Holder said.

Holder is the highest-ranking member of the Obama administration to defend the prosecution of Swartz. During questioning, Republican senator John Cornyn suggested the government had mishandled the case.

"Does it strike you as odd that the government would indict someone for crimes that would carry penalties of up to 35 years in prison and million-dollar fines, and then offer him a three – or four-month prison sentence?" Cornyn asked.

Holder replied: "I think that's a good use of prosecutorial discretion to look at the conduct, regardless of what the statutory maximums were, and to fashion a sentence that was consistent with what the nature of the conduct was. And I think what those prosecutors did in offering three, four, zero to six [months] was consistent with, with that conduct."

"This is not the Department of Justice; it's the Department of Vengeance. If you look at the Department of Justice, they are not interested in admitting their mistakes, they are interested in covering their asses," Stinebrickner-Kaufmann said.

She said that government staffers had told her that Swartz's political beliefs influenced the handling of the case. Justice Department representatives told one congressional aide that Swartz' Guerilla Open Access Manifesto was being used to establish "malicious intent" to illegally download large amounts of documents.

In the July 2008 manifesto, Swartz argued that civil disobedience was justified in the campaign for an open internet.

He wrote: "We need to take information, wherever it is stored, make our copies and share them with the world. We need to take stuff that's out of copyright and add it to the archive. We need to buy secret databases and put them on the Web. We need to download scientific journals and upload them to file sharing networks. We need to fight for Guerilla Open Access."

Stinebrickner-Kauffman said the document did not reflect his views five years later.

In a statement, Ortiz expressed sympathy for his family and friends and acknowledged that there was little she could do to quell anger felt by people who saw her office's tactics as overreaching.

"I must, however, make clear that this office's conduct was appropriate in bringing and handling this case. The career prosecutors handling this matter took on the difficult task of enforcing a law they had taken an oath to uphold, and did so reasonably," Ortiz said.