FRESNO (AP) -- A California court has ordered the state's Department of Public Health to establish a safe drinking water standard for the cancer-causing chemical made famous in the film "Erin Brockovich."

An Alameda County Superior Court judge directed the agency to propose a drinking water standard for hexavalent chromium by the end of August. The ruling on July 18 came nearly a year after environmental groups filed a lawsuit against the state, claiming it was eight years late in setting the standard.

Results of state water quality testing conducted between 2000 and 2011 throughout California showed that about a third of the 7,000 drinking water sources tested had hexavalent chromium levels at or above a preliminary benchmark set by the California EPA. The chemical comes chiefly from industrial pollution, but also occurs naturally.