A US prosecutor at the center of a controversy over the handling of a case involving an Internet activist who committed suicide has defended the government's actions as "appropriate."

A US prosecutor at the center of a controversy over the handling of a case involving an Internet activist who committed suicide has defended the government's actions as "appropriate."

Assistant US Attorney Carmen Ortiz expressed regret over the death of Aaron Swartz, who was accused of illegally copying and distributing millions of academic articles from a database but said prosecutors were merely doing their job.

"I know there is little I can say to abate the anger felt by those who believe that this office's prosecution of Mr. Swartz was unwarranted and somehow led to the tragic result of him taking his own life," she said in a statement Wednesday.

She added that "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 that contrary to media reports, prosecutors had no intention of seeking the maximum 35 years imprisonment for Swartz and that in plea negotiations offered to recommend six months in "a low-security setting."

She said any sentencing would have been decided by a judge and that defense lawyers could have argued for probation if Swartz agreed to plead guilty.

The case has ignited a flurry of comments over what some called a "draconian" US computer crime law used by allegedly overzealous prosecutors.

Swartz, who was just 14 when he co-developed the RSS feeds that are now the norm for publishing frequent updates online and went on to help launch social news website Reddit, hanged himself in his New York apartment on Friday.

He was 26 and reported to have been battling depression.

He had been due to stand trial in April for allegedly breaking into a closet at the Massachusetts Institute of Technology to plug into the computer network and download millions of academic journal articles from the subscription-only JSTOR service.

US Representative Zoe Lofgren this week proposed a reform of the statute used by the prosecution in a proposal she dubbed "Aaron's Law."

"There's no way to reverse the tragedy of Aaron's death, but we can work to prevent a repeat of the abuses of power he experienced," the lawmaker wrote on Reddit.

"The government was able to bring such disproportionate charges against Aaron because of the broad scope of the Computer Fraud and Abuse Act (CFAA) and the wire fraud statute. It looks like the government used the vague wording of those laws to claim that violating an online service's user agreement or terms of service is a violation of the CFAA and the wire fraud statute."

Explore further Feds dismiss charges against Swartz, cite suicide

(c) 2013 AFP