TRANSCRIPT: Reporter Michael Montgomery: Call it weed détente. For years, Mendocino County, like other places in Northern California, struggled to contain an explosion in pot growing, especially since the state legalized the use of medical marijuana. So two years ago, officials decided to try something completely new -- legalize medical marijuana production under strict conditions. And they gave the job to a barrel-chested sheriff's sergeant named Randy Johnson.
Randy Johnson: Prior to July, when the program started, what I knew about marijuana was chop it down and haul it to the evidence locker. (Crowd laughs.)
Reporter: That's Johnson speaking at a local library last year. It was one of dozens of meetings with growers aimed at coaxing them out of the shadows. Johnson tells the group they're allowed to cultivate enough medical marijuana to support a real business -- but only if they follow environmental rules, submit to inspections by the cops and pay hefty fees.
Johnson: I haven't had a single complaint on any of your gardens, and I thank you for that. (Applause)
Reporter: The program has earned the sheriff's department more than half a million dollars and enlisted nearly 100 growers. One of them is George Unsworth. On a recent day, Unsworth walked down a narrow trail on his property, which is situated on a rugged mountain in a remote part of the county.
George Unsworth: We're on the north side of Round Valley.
Reporter: Unsworth says for decades, he grew marijuana guerrilla-style. Then he joined the county's cultivation program.
Unsworth: We're fallow now.
Reporter: At a large garden strewn with brown weeds, Unsworth pulls out his smartphone. He flicks to an image showing him standing at the same spot last year with a man in uniform.
Unsworth: See, that's where he is, and right there, and you see the plants behind him right here.
Reporter: That's you and a sheriff's deputy standing here on your land. And there's marijuana plants right behind you.
Unsworth: Yeah, see the plants behind.
Reporter: And you're both smiling.
Unsworth: Shaking the deputy sheriff's hand and looking over this incredible wilderness and not being on the ground, my feet facing the dirt and handcuffs and getting ready to go to jail. I cannot describe the joy of feeling that we were finally part of the county, not the outcasts.
Reporter: After California voters legalized medical marijuana use 16 years ago, the state never determined how pot should be produced, leaving such regulations to local authorities. So far, only Mendocino has taken on the challenge.
Unsworth: There we go.
Reporter: Unsworth unfurls a large banner stenciled with his county permit number. He uses it to notify aerial patrols that this is a legal farm. He says last season, it worked.
Unsworth: And so when the helicopters are flying over us, we could just wave. (Laughs)
Reporter: But in October, federal prosecutors went on the offensive against California's marijuana industry, closing dozens of storefront dispensaries and seizing properties.
Melinda Haag: The law has been hijacked by profiteers who are motivated not by compassion, but by money.
Reporter: That's the U.S. attorney for Northern California, Melinda Haag. She also warned cities and counties that marijuana licensing schemes were against federal law. Soon after, heavily armed DEA (Drug Enforcement Administration) agents raided a farm in Mendocino owned by one of the county's legal growers.
Protesters (chanting): DEA go away, DEA go away!
Reporter: The crackdown sparked protests in San Francisco during a visit by President Obama. The U.S. attorney's Office and the DEA declined to comment. Former federal prosecutor Joe Russoniello says allowing sick people to use medical marijuana is one thing, but it's quite another for a county like Mendocino to issue permits to marijuana growers and allow them to sell their product around the state.
Joe Russoniello: As soon as you cross county lines, packaging it, suggesting you have a client base or patients or members, you are basically a commercial enterprise for profit and in violation of state and federal law.
Reporter: But Mendocino County Sheriff Tom Allman says the feds were meddling in county affairs.
Tom Allman: It made me a little bit distrustful. I'm hoping this wasn't intentional saber rattling. I'm hoping they weren't saying, "Well, if we show Mendocino County that we mean business, then all these other counties are going to back off." Really?
Reporter: It wasn't just saber rattling. Last month, federal prosecutors gave Mendocino an ultimatum: End the program or face costly litigation and possible criminal action. The issue finally came to a head at a Board of Supervisors meeting. In a packed conference room, dozens of anxious growers spoke out against the feds and in support of the regulations, including George Unsworth.
Unsworth: I would like to say, supervisors ... I voluntarily would do anything to keep the program going. And I think I speak for most of the other people who were in my position, that would run in the woods when the helicopters came flying.
Reporter: But support wasn't universal. Dispensary owner Mike Johnson urged the county to abolish the program.
Mike Johnson: This ordinance has subjected the entire medical cannabis community of Mendocino County and the state of California to intense federal scrutiny, which we don't want or need. To me, it wasn't worth the trouble it caused.
Reporter: In the end, Mendocino officials concluded they couldn't afford a legal fight with the feds and agreed to gut the regulations. They're expected to formally end the program tomorrow. All this left county Board Chairman John McCowen exasperated.
John McCowen: It means it's going to go back underground. It's going to become more dangerous. It's going to become more profitable for the black marketeers. I just don't see that this represents progress.
Reporter: But the fight might not be over. A group of Mendocino growers is hoping to revive the program in time for the spring planting, but as a voluntary and private effort. For NPR News, I'm Michael Montgomery
This story was produced as part of a collaboration between member station KQED and the Center for Investigative Reporting's California Watch.
Story courtesy of our media partners at California Watch (A Project of the Center for Investigative Reporting)