Months after being raided by D.C. police for allegedly selling drug paraphernalia, Capitol Hemp will close the doors on its two D.C. locations in August.

At a court hearing this morning, Capitol Hemp co-owner Adam Eidinger agreed to a Deferred Prosecution Agreement that requires that he close the doors on the store’s flagship location in Adams Morgan and one in Chinatown over the next four months. In exchange, any prosecution for the attempted sale of drug paraphernalia will be put off.

The store’s two locations were raided in October, but Eidinger and co-owner Alan Amsterdam were not charged until December. Since then, they had gone back and forth with prosecutors over what charges they could face and what the impact on the stores would be.

Eidinger told us that he made the best of what was a difficult situation. During the October raids, police seized over $300,000 worth of merchandise, which he has been trying to get back. Had he gone to trial and lost, he wouldn’t have been able to recover any of it, which included highly prized artisinal water pipes. Under the terms of the deal, Eidinger will get the seized merchandise back within 48 hours, after which they’ll try to return as much as possible to vendors and distributors. “At least we can get our equity out,” he said.

The October raids—which included two other Adams Morgan businesses—centered around the city’s sometimes vague drug paraphernalia laws. Selling water pipes isn’t illegal in and of itself, but if police can prove that the seller knows that the buyer will be using them for illegal drugs, the sale itself becomes unlawful. A police affidavit justifying the raids argued that books, DVDs and images of marijuana farms served as evidence enough that the water pipes would be used as bongs. (A California-based hydroponics store that opened locally last week had to scale back what it could sell and say to avoid running afoul of D.C. law.)

Eidinger, a well-known local activist, opened Capitol Hemp in 2008. Beyond the pipes, which were kept in a separate section of the store and included disclaimers that they were only to be used for legal purposes, Eidinger and Amsterdam sold loose-leaf tobacco, hemp products and organic favorites like Dr. Bronner’s soaps. Eidinger was also involved in the D.C. Patients’ Cooperative, a non-profit that wanted in on the city’s medical marijuana program but decided against it after they were told they’d have to sign waivers attesting to the fact that marijuana remains illegal under federal law.

Eidinger said that the outcome “speaks to the general insensitivity to people in the community that are friendly to cannabis.”

The section of the deal stipulating that the two Capitol Hemp locations must close within four months.