Michael Francis McElroy / ZUMA Press Aaron Swartz in Miami, Jan. 30, 2009.

At the funeral of Aaron Swartz, the 26-year-old Internet freedom crusader, Swartz’s father had a blunt message. Aaron — who committed suicide last week while being prosecuted for hacking — “was killed by the government,” he declared. The elder Swartz fanned the flames of a growing debate: Did federal prosecutors go too far in pursuing Swartz on serious felony charges, and are they in part responsible for his death?

(MORE: Aaron Swartz, Tech Prodigy and Internet Activist, Is Dead at 26)

Swartz, a computer prodigy, helped create Reddit but was perhaps best known as a freedom-of-information activist. In addition to campaigning against overly punitive copyright laws, he allegedly linked his laptop to the Massachusetts Institute of Technology’s computer system to download millions of articles from JSTOR, a paid-subscription database of academic articles. (MIT was a subscriber to JSTOR, but Swartz was not an authorized user.) Federal prosecutors in Boston charged Swartz with 13 felony counts that could have sent him to prison for more than 30 years.

Since Swartz’s death — he was found hanged in his home in Brooklyn — his family, friends and allies in the information-freedom movement have put much of the blame on federal prosecutors. Swartz’s family said in a statement on an online memorial site that his death is “the product of a criminal justice system rife with intimidation and prosecutorial overreach.” In particular, they charge that the U.S. Attorney’s Office in Massachusetts contributed to Swartz’s death by choosing to pursue “a harsh array of charges … to punish an alleged crime that had no victims.”

(MORE: Aaron Swartz’s Suicide Prompts MIT Soul-Searching)

U.S. Attorney Carmen Ortiz pushed back Wednesday, saying that her prosecutors have a duty of “protecting the use of computers and the Internet” and that they had never intended to see the maximum sentence of 30 years given. In fact, they had offered Swartz a plea-bargain deal that would have put him in prison for only a few months — a deal he had rejected. In a blog post titled “Prosecutor as Bully,” Harvard law professor Lawrence Lessig — a friend and legal adviser to Swartz — said that Swartz balked at being labeled a “felon” and after 18 months of negotiations, that was “what he was not willing to accept.”

Swartz’s case may not be as black-and-white as his loved ones suggest; no one person or entity “killed” Swartz. Suicide is caused by mental illness. But in bringing such tough charges against him, prosecutors do seem to have wrongly used their discretion. There is still more to be learned about how the Boston U.S. Attorney’s office made the choices it did, and Representative Darrell Issa, chairman of the House Oversight Committee, has announced that his committee is investigating. Swartz’s actions were not above reproach. He appears to have been in the middle of a plan to “liberate” and disseminate privately owned articles. But the offense he was engaged in was not crime of violence or greed. It seems, rather, to have been an act of civil disobedience, or lawbreaking in the service of Swartz’s (and many people’s) idea of a more just world. That does not mean that Swartz had a right to do what he did or not to be punished. But his motives should have been an important part of the government’s calculus.

(MORE: Aaron Swartz’s Suicide Triggers Response from U.S. Lawmakers)

Prosecutors considering what charges to bring must think seriously about deterrence: how to prevent this defendant and others from committing similar crimes in the future. In Swartz’s case, that could likely have been accomplished with far less firepower. In Swartz’s case, a misdemeanor conviction and a stern warning that the next infraction would result in a felony charge would have likely put him on a straight path.

This week, a member of Congress proposed a bill called Aaron’s Law that would revise the computer fraud statute he was charged under. The law does need changing, but that alone will not solve the problem. Swartz’s death should prompt soul-searching and brainstorming in the Department of Justice and in local prosecutors’ offices around the country about how to spot prosecutorial overzealousness — and how to make sure that in future cases the proposed punishment better fits the crime.