A D.C. Superior Court judge on Monday dismissed charges against a police sergeant with a small District law-enforcement agency who was arrested in March 2011 for possessing an AR-15 assault weapon that he kept in his apartment.

The judge, hearing the case without a jury, threw out three gun charges mid-trial after the defense found an e-mail that it argued prosecutors had failed to make available. The judge never decided guilt or innocence.

J. Michael Hannon, the attorney for the accused officer, said the result vindicates his client. “I tried to persuade both the police and the attorney general that this was a wrong-handed prosecution,” he said after the ruling. “The District has fractured gun laws. They’re going to need to fix it or continue to have disasters like this.”

But in a statement, the District attorney general’s office defended the prosecution, saying that it believes it “was in the public interest because those entrusted to enforce the law should abide by it as well, especially laws concerning guns.” The statement called the dismissal “unwarranted” and said the office is considering asking a higher court to intercede.

Sgt. John Barbusin of the D.C. Protective Services Police Department said he bought the assault weapon in 2009 with the consent of his police chief, whose deputy provided a letter to a Maryland gun shop approving the purchase for “performance of official duties.”

He was arrested two years later, after police raided his Northeast Washington apartment and charged him with possession of an illegal weapon as well as other illegal firearm counts.

D.C. police said Barbusin is a commissioned officer with limited arrest powers while guarding municipal offices; he was authorized to carry only a 9mm handgun. Assault weapons are illegal in the District. Barbusin maintained that the authorization letter gave him federal authority to possess the weapon.

The chief of the department at the time, and the deputy who signed the authorization letter, testified at trial that they could not recall the precise circumstances around the letter. The former chief had wanted to start a tactical team and arm its officers with assault weapons but had not received approval from city leaders.

Barbusin’s attorney said his client and others got permission to own the guns so they could train on their own time. Prosecutors and police argued that Barbusin used the authorization letter to bypass records checks and a 30-day waiting period to obtain the weapon for his personal use.

It remained unclear Monday whether Barbusin would get his job or his gun back. Hannon said he deserved both.

Authorities said that they might not be able to return the weapon because it remains illegal to possess it in the District.