PORTLAND, Ore. — The 346 clumps of moss that science researchers from the United States Forest Service scraped from tree trunks and branches across this city looked as ordinary as moss gets — ancient, simple and common to the point of invisibility in the Pacific Northwest’s palette of green.

But the moss had a riveting tale to tell, with shock waves that are still spreading.

Toxic heavy metals, notably cadmium, which can cause cancer and kidney malfunction, were detected in the samples, with high concentrations in particular around two glass factories in residential neighborhoods, both of which had used metals for coloring their products.

In a city that prides itself on being an environmental example to the world — from its throngs of bike commuters to its antisprawl development rules — the moss study results roared, producing an upheaval of surprise, anger and fear. Residents shouted or wept in public meetings last month, raging at state officials, who released the results and then found themselves blamed for not knowing what the factories were putting up their smokestacks.

On Tuesday, the director of Oregon’s Department of Environmental Quality, Dick Pederson, resigned abruptly, saying he had health concerns that needed immediate care.