This story was originally published by HuffPost and is reproduced here as part of the Climate Desk collaboration.

Democrats notched wins in a number of key midterm races out West after running on platforms of protecting public lands and maintaining them under federal control — victories that conservation groups are celebrating as a repudiation of the Trump administration’s “energy dominance” agenda.

Reader support makes our work possible. Donate today to keep our site free. All donations TRIPLED!

The administration’s “deeply unpopular” rollbacks of protected national monuments and its sweeping proposal to open up nearly all U.S. waters to offshore oil and gas development “fueled pro-conservation wins” in states like Nevada, New Mexico, and even South Carolina, Matt Lee-Ashley, a senior fellow at the Center for American Progress, said in a statement.

“We are seeing an unmistakable pattern of pro-conservation election outcomes in states and districts that are bearing the brunt of the Trump Administration’s attacks on parks, wildlife, and oceans,” he said.

Grist thanks its sponsors. Become one.

Public lands were front and center in the contentious Montana Senate race between incumbent Jon Tester, a Democrat, and state auditor Matt Rosendale, a Republican. Though President Donald Trump traveled to Montana four times to campaign for Rosendale, Tester — a frequent critic of the president — defeated the self-proclaimed “Trump conservative.” And he did it in a state that Trump carried by 20 percentage points in the 2016 election.

In campaign advertisements featuring sportsmen and women with shotguns and fly-fishing rods, Tester’s team touted his record of voting to protect public lands, and pegged Rosendale as an East Coast developer who threatened the state’s wild spaces and way of life.

Rosendale, on the other hand, supported transferring federal lands to states during his 2014 bid for the U.S. House of Representatives. That year he told The Billings Gazette that “public lands were never intended to remain in control of the feds.” It’s clear Rosendale recognized that was not a winning stance in Big Sky Country, and promptly reversed course during the campaign to say the exact opposite.

Tracy Stone-Manning, the associate vice president for public lands at the National Wildlife Federation and former chief of staff of Montana Governor Steve Bullock, said Tester won in part because “voters didn’t buy Rosendale’s late and politically convenient conversion.”

Grist thanks its sponsors. Become one.

While Tester has an 86 percent lifetime score from the League of Conservation Voters, the nonprofit advocacy group named Rosendale to its 2018 Senate “Dirty Dozen” list of candidates it calls anti-environment. And LCV spent just shy of $1 million on an ad campaign highlighting Rosendale’s support for rolling back federal land protections and his ties to fossil fuel billionaires Dan and Farris Wilks.

In New Mexico, Democratic incumbent Senator Martin Heinrich, a fierce critic of Trump’s national monument rollbacks who championed the creation of monuments and wilderness areas in the state, walloped Republican opponent Mick Rich, a commercial contractor who described Heinrich as the “foremost proponent of turning New Mexico into an environmentalists’ Disneyland.” In Nevada, Republican Senator Dean Heller, who called the Obama administration’s 2016 designation of Gold Butte National Monument an “extreme overreach” and urged the Trump administration to modify the boundary, lost his re-election bid to Democratic Representative Jacky Rosen. Rosen, who has a 97 percent lifetime score from LCV, campaigned on protecting public lands, including Gold Butte and Basin and Range national monuments, and pushing forward on renewable energy.

Strong support for public lands and environmental protection also appears to have helped boost several candidates in U.S. House races. In Arizona’s 1st Congressional District, incumbent Representative Tom O’Halleran, a Democrat, defeated Republican Wendy Rogers, who praised Trump’s decision to open offshore waters and the pristine Arctic National Wildlife Refuge to oil and gas drilling. In Nevada, Democrat Steven Horsford defeated Republican Cresent Hardy, and Democrat Susie Lee beat Republican Danny Tarkanian in the state’s 4th and 3rd Congressional Districts. Both Hardy and Tarkanian support transferring control of federal lands to the state. And in South Carolina’s 1st Congressional District, Democrat Joe Cunningham, an ocean engineer, upset Republican Katie Arrington by standing firmly against Trump’s offshore drilling plans.

Conservation groups, including CAP and Colorado-based Center for Western Priorities, also celebrated wins in a number of state races. Those included the victory by Colorado’s Jared Polis, the first openly gay man elected governor in the U.S., who during the campaign connected his opponent, Republican Walker Stapleton, to Interior Secretary Ryan Zinke and the administration’s efforts to roll back public lands protections.

“Voters across the West voted with their values and their wallets when they elected representatives that support public lands, access to them and the wise management of them,” Stone-Manning said.