The U.S. Supreme Court has killed a lawsuit that sought to challenge the validity of one of California’s key medical marijuana laws.

By refusing Monday to review the lawsuit brought in 2006 by San Diego County and later joined by San Bernardino County, the court let stand the state law requiring counties to issue identification cards to qualified medical-marijuana patients. The ID card program was adopted in 2004 under SB 420, the Medical Marijuana Program Act; the cards are meant to protect patients by helping law enforcement officers discern protected medical marijuana use from illicit recreational use.

The counties had claimed they didn’t have to comply because the state law was pre-empted by the federal ban on marijuana. But a San Diego Superior Court judge and the California Court of Appeal ruled against them, and the California Supreme Court had refused to review the case; the national highest court’s review was their final venue. Several other counties — Colusa, Madera, Mariposa, Modoc, Mono, Solano, Stanislaus, and Sutter — had declined to issue the cards pending the lawsuit’s final outcome.

“No longer will local officials be able to hide behind federal law and resist upholding California’s medical marijuana law,” said Joe Elford, chief counsel with Oakland-based Americans for Safe Access