The Commonwealth of Massachusetts has dropped all six charges against Aaron H. Swartz, the computer activist who allegedly downloaded millions of academic journal archives from JSTOR via a laptop housed in network closet in MIT’s Building 16 running “keepgrabbing.py.”

“In the interest of justice, we agreed to let the federal case have precedence,” said Cara O’Brien, a spokeswoman for the Middlesex District Attorney’s office. Many of the witnesses would have been the same in the two cases, she said, and since the state case would have gone to trial first, witnesses testimony might compromise the federal case.

The dropping of the charges appeared in the court’s electronic docket yesterday, though it was dated Thursday, March 8, 2012.

The charges dropped by Massachusetts were two counts of breaking and entering, one count of larceny over $250, and three counts of unauthorized access to a computer system.

Swartz’s alleged downloading took place between September 2010 and January 2011. He was indicted by a federal grand jury in July 2011.

Swartz, who has been out on bail since two days after his July arrest, has subsequently left the Boston area and now resides in Brooklyn, New York, where he works for Avaaz Foundation, a nonprofit “global web movement to bring people-powered politics to decision-making everywhere.”

His federal case is currently in discovery, and the defense has begun to review the “substantial” quantity of material from the government, according to a joint status report filed on March 8.

A trial is likely and would last “around three weeks,” the status report says. The case’s next status conference is set for May 14, 2012.

Swartz’s attorney, Martin G. Weinberg, was pleased by the decision and called it an “exercise of proper discretion by a wise and experienced prosecutor’s office.”