Attorney General Eric Holder on Wednesday said the suicide death of internet activist Aaron Swartz was a “tragedy,” but the hacking case against the 26-year-old was “a good use of prosecutorial discretion.”

Holder, the nation’s top prosecutor, is the highest-ranking member of the President Barack Obama administration to defend the indictment and prosecution of the former director of Demand Progress, who committed suicide in January as his April trial approached. Holder’s comments come seven weeks after Massachusetts U.S. Attorney Carmen Ortiz, whose office was prosecuting Swartz, said the authorities’ actions were “appropriate in bringing and handling this case.”

The attorney general was testifying at a Justice Department oversight hearing before the Senate Judiciary committee and was facing terse questioning from Sen. John Cornyn (R-Texas).

Cornyn said the prosecution was based on “prosecutorial zeal” and “I would say even misconduct.”

Cornyn asked the attorney general: “Have you looked into that particular matter and reached any conclusions?”

Holder replied:

Let me first say that Mr. Swartz’s death was a tragedy. My sympathy goes out to his family and to his friends — those who were close to him. It’s a terrible loss. He’s obviously a very bright young man and had I think a good future in front of him. As I talked to people who’ve looked into this matter, these news reports about what he was actually facing is not consistent with the interaction was between the government and Mr. Swartz. An offer, a plea offer, was made to him of 3 months before the indictment. This case could have been resolved with a plea of 3 months. After … the indictment, an offer was made that he could plead and serve 4 months. Even after that, a plea offer was made of a range of from zero to 6 months that he would be able to argue for a probationary sentence. The government would be able to argue for up to a period of 6 months. There was never an intention for him to go to jail for longer than a 3-, 4- potentially 5-month range. That is what the government said specifically to Mr. Swartz. Those, those offers were rejected.

Cornyn, echoing a growing number of people, suggested the government was bullying Swartz by ratcheting up the charges.

The Texas lawmaker asked: “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 3- or 4-month prison sentence?”

Holder responded: “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 3, 4, zero to 6 was consistent with, with that conduct.”

Swartz was found dead at his Brooklyn apartment in January after committing suicide. He was under indictment (.pdf) in Massachusetts for more than a dozen counts of computer hacking and wire fraud in connection to the downloading of millions of academic articles from a subscription database from MIT’s campus. An internet sensation who helped develop the Creative Commons and was part of a small team that sold Reddit to Wired parent company Condé Nast, prosecutors suggested Swartz had planned to release to the public the millions of JSTOR academic papers he downloaded.

Notwithstanding Holder’s testimony, Massachusetts federal prosecutors twice indicted Swartz for the alleged hacking, once in 2011 on four felonies and again last year on 13 felonies. The case included hacking charges under the Computer Fraud and Abuse Act that was passed in 1984 to enhance the government’s ability to prosecute hackers who accessed computers to steal information or to disrupt or destroy computer functionality.

The indictment accused Swartz of repeatedly spoofing the MAC address — an identifier that is usually static — of his computer after MIT blocked his computer based on that number. The grand jury indictment also noted that Swartz didn’t provide a real e-mail address when registering on the network. Swartz also allegedly sneaked an Acer laptop bought just for the downloading into a closet at MIT in order to get a persistent connection to the network.