Like their counterparts in many other municipalities that have regulated medical marijuana on their own, Arcata officials say the federal offensive has brought renewed chaos to the medical marijuana industry. The federal authorities, their critics say, have indiscriminately targeted good and bad dispensaries, sometimes putting the best ones out of business. The crackdown, the critics say, has made it difficult for qualified Californians to obtain marijuana for medical use and is just pushing buyers into the black market.

Acting on federal law, which considers all possession and distribution of marijuana to be illegal, California’s four United States attorneys, working with the Drug Enforcement Administration and the Internal Revenue Service, have shut down at least 500 dispensaries statewide in the last eight months by sending letters to operators, landlords and local officials, warning of criminal charges and the seizure of assets. The United States attorneys said the dispensaries were violating not only federal law but also state law, which requires operators to be primary caregivers to their customers and distribute marijuana only for medical purposes.

“We’re not concerned in prosecuting patients or people who are legitimate caregivers for ill people, who are in good faith complying with state law,” said Benjamin B. Wagner, the United States attorney for the Eastern District of California. “But we are concerned about large commercial operations that are generating huge amounts of money by selling marijuana in this essentially unregulated free-for-all that exists in California.”

Because of the lack of regulation, it is difficult to know precisely how many dispensaries have shut down or even how many were in operation before the start of the current crackdown. But figures provided by three of California’s four United States attorneys totaled more than 500: “dozens” in Mr. Wagner’s district; 217 in the Southern District, in San Diego; and more than 200 in the Central District, in Los Angeles. Officials in the three districts say they have succeeded in putting out of business more than 90 percent of the dispensaries they have identified so far.