David Eyster, the Mendocino district attorney, said the surge in the marijuana business had brought with it violent crime, which did not appear to be going away anytime soon.

Among the cases he is handling are a robbery and slashing death of a grower; the murder of a man at a marijuana farm by a co-worker wielding a baseball bat; an armed heist in a remote area by men who posed as law enforcement officers; and a robbery by two men and a juvenile who were invited to a barbecue and then drew guns on their hosts and fled with nine pounds of marijuana.

“The folks in the big cities, they don’t realize that out in the rural areas where the marijuana is being grown, there are people being robbed, kidnapped and in some cases murdered,” Mr. Eyster said.

California took a different path from Colorado, the first state to legalize marijuana, where possession of large amounts of unregulated cannabis remains a felony and where the black market is significantly smaller, according to Sean McAllister, a lawyer who specializes in cannabis cases in both states.

“As someone who has lived through the transition in Colorado, when I go to California I am definitely shocked to see that people in the industry seem very ill-prepared for the transition,” Mr. McAllister said.

Police officers in Mendocino County said their priority was to go after people who cause environmental damage or who grow on public lands. So far this year they have raided 74 sites and eradicated more than 90,000 plants. Illegal plots are identified by helicopter and then destroyed by a convoy of well-armed police officers and a plant shredder towed by a pickup.

“I think we can all agree that your average pot smoker shouldn’t be in prison,” said Shannon Barney, a lieutenant in the Mendocino sheriff’s office who helped lead a raid in August that ended in the destruction of more than 800 plants. “But I think everybody can also agree that punishment for a major trafficker needs to be more severe.”