Two days after Donald Trump’s election victory, environmental regulators in Wyoming debunked one of the biggest claims of anti-oil and gas activists: That hydraulic fracturing – also known as fracking – contaminated drinking water in Pavillion, Wyoming, a small town of roughly 240 people.

For years, anti-fracking activists have cited Pavillion’s plight over and over again as proof that hydraulic fracturing must be banned. Josh Fox, director of the anti-fracking movie Gasland, has probably done more than anyone to spread this assertion. Fox even got himself arrested at a 2012 congressional hearing on the Pavillion case. I got to watch that happen: I was a witness at the hearing for the oil and gas industry

It was all a myth. Not even President Obama’s Environmental Protection Agency (EPA) believed it was true. In fact, the so-called contamination in Pavillion – announced to the world in 2011 – was almost certainly caused by the EPA itself.

Nonetheless, it was a myth with a purpose, to play on American fears that the nation’s amazing energy revolution would poison our environment unless we kept those oil and gas resources forever underground.

The anti-fracking campaign was never about public safety or grounded in fact. It has since morphed into the “keep it in the ground” movement, which opposes any kind of oil, natural gas or coal project, no matter how it’s developed or where.

Throughout the entire Pavillion saga, activists used campaign-style tactics and media spin to stoke controversy. They staged protests, lobbied the news media to cover the story in the most alarming way possible, distorted the facts and produced their own highly misleading reports on the case.

Such tactics were necessary because the EPA’s draft report on Pavillion – released five years ago – was never what the activists claimed. It was supposed to investigate taste and odor complaints tied to a number of shallow water wells in Pavillion. But EPA investigators drilled their own monitoring wells incorrectly, actually introducing contaminants which were later detected in water samples.

Based on those tainted samples, the EPA floated a loose theory that fracking could have been the cause. But the draft report could not “verify or refute” this theory.

When the first wave of headlines hit, suggesting that fracking was the cause, EPA declared there was “absolutely no indication … that drinking water is at risk.” But the EPA did not do enough to correct inflammatory claims made about the report. Activists took full advantage, calling the Pavillion case a “smoking gun” against fracking.

But that wasn’t true. As state regulators and other federal agencies including the Bureau of Land Management and the U.S. Geological Survey dug further into EPA’s draft report, they found less and less reason to blame hydraulic fracturing.

Instead, they found major problems with the EPA’s water-quality monitoring wells. But in response to criticism, EPA officials stonewalled and never submitted the draft report for peer review. The EPA dragged its feet until 2013, when it finally dropped the Pavillion case and handed the investigation over to the state experts at Wyoming’s Department of Environmental quality.

When state officials released their findings on Nov. 10, they concluded in an 80,000-page report that there was no evidence fracking fluids had “risen to shallow depths utilized by water-supply wells,” as a summary of the report put it.

A more likely cause of taste and odor complaints from residents, the experts said, was bacteria buildup in their groundwater wells. The experts also called for EPA’s monitoring wells to be shut down, because of “the potential hazard they pose in relation to groundwater supplies and physical safety.”

That’s right: EPA’s own monitoring wells were the real problem after all.

It took five years for the facts to prevail in Pavillion. But if the EPA had admitted its mistakes, and dared to criticize the fear tactics of the environmental lobby, the truth would have been known much sooner.

Fear is no substitute for science and good public policy. The EPA must do better in the future, and with new leadership, I hope and believe it will.