This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

SACRAMENTO, Calif. (AP) — A state-run pest prevention program partly violates California’s landmark environmental protection law with its approach to spraying pesticides, a state appeals court has ruled.

The ruling centers on a pest prevention and management program run by the California Department of Food and Agriculture. The court found the program violates the California Environmental Quality Act by failing to conduct site-specific environmental reviews and notify the public before sprays. The ruling also found the program doesn’t appropriately consider contamination to water bodies or mitigate harm on bees and that the department understated existing pesticide use.

California’s 3rd District Court of Appeal issued the ruling Friday. The California Department of Food and Agriculture is reviewing the ruling, spokesman Steve Lyle said Monday in an email. He did not provide further comment.

Several environmental groups and the city of Berkeley brought the lawsuit, and they lost on some grounds in the appeal. The court, for example, said the groups failed to show that the pest control program’s analysis of human health effects was misleading or inadequate.

“We think that this ruling is a real signal that the California Department of Food and Agriculture needs to move away from a ‘spray first, ask questions later’ approach,” Jonathan Evans, environmental health legal director at the Center for Biological Diversity, said Monday.

The food and agriculture department is tasked with preventing the spread of insects and pests, plant disease and noxious weeds on public and private property. The California Environmental Quality Act, known as CEQA, requires environmental impact reports for all major projects, including pesticide spraying.

The department in 2014 adopted a single environmental review process for all pest prevention and management projects designed for “efficient and proactive” management, according to its website. Individual projects are checked against it for compliance. The lawsuit from environmental groups challenges that approach, arguing it failed to take into account local conditions and possible effects on water, bees and other pollinators and human health.

Spraying pesticides is not the only tool the state uses for pest management, but it was the focus of the lawsuit.

The lawsuit will now go back to the lower court. It’s not yet clear whether the entire program will be scrapped or if the state will be allowed to change certain aspects.