Whitefish, Montana, employs a counterintuitive yet well-established method for cleaning its water supply: It spends money on forest preservation.

When the appetite for high-priced housing threatened the water source of this picturesque mountain town, the residents raised taxes and spent money on forests.

Three years later, when rising tourism upped the summer demand for water, more money was raised to buy more forests.

The equation used by local and state officials, nonprofit groups, and private residents was straightforward: It’s cheaper and easier to have the forests cleanse the water than to throw chemicals and machinery at the task.

“Protecting forests of watersheds makes economic sense,” says John Muhlfeld, the mayor of this town of 7,000 nestled in Montana’s Rocky Mountains. “And it’s a much different way of traditionally looking at a public water supply infrastructure.”

Whitefish’s embrace of the idea of preserving forests to protect its water supply is evidence of the growing adoption of a tactic that once seemed risky, and is now proving immensely successful for big cities and small towns alike.