HELENA, Mont. — Mike Cooney has been on the grassy trail only a few minutes, his face partly obscured by an "I ♥ public lands" pandemic mask, when a couple approaches to tell him they've donated to his campaign and need him to win the race for governor.

“I swear I didn’t set that up,” he says with a laugh.

It’s a typical moment in Montana politics: people randomly recognizing a candidate and walking up to wish him or her well. But this race, perhaps the clearest case in decades of ideological opposites running for the top job, is anything but typical.

In a state where voters routinely split the ticket and vote across party lines, retail politics and personal connections have long mattered. The 2020 gubernatorial contest has morphed into something different, led by ad spending and partisan identity centered on President Trump. It is a reflection of the polarization gripping the nation, which now threatens this traditionally bipartisan state.

The two opponents epitomize old versus new Montana politics. Cooney, 66, is a well-liked Democrat, a sitting lieutenant governor and grandson of a 1930s Montana governor, with decades of public service experience. His opponent is two-term Rep. Greg Gianforte, 59, a Trump-aligned Republican running largely on his credentials as a self-made multimillionaire tech businessman.

In their virtual debates — the coronavirus pandemic derailed actual faceoffs — Gianforte has derided Cooney’s years in government, while Cooney centered his attacks on Gianforte’s sharply conservative positions.

The Cook Political Report considers theirs the only toss-up governor’s race this fall, and with early voting already underway, Gianforte maintains a slight edge in the few polls that have assessed the race. The most recent showed him with 47 percent support over Cooney’s 42 percent, just inside the margin of error. Seven percent of voters were still undecided, more than in the state’s other big contests.

Political scientist David Parker of Montana State University, who ran that Treasure State poll, said he doesn’t think Montana is heading hard right despite Trump winning here by more than 20 points in 2016. “The real question is, how much is Montana’s vaunted independence real?” he said.

These days, the answer is complicated. The state has been gentrifying and growing more stratified, with the balance of power and issues shifting significantly — from traditional labor concerns to more emphasis on recreation and public lands, as well as conservation. There are pressures to address the increasing income gap and an affordable housing crisis.

Though Montana is often described as politically red, that mostly applies to how it votes for president. In federal and statewide races, the truth is more nuanced. Political attitudes often vary starkly by location, sometimes heightened by the influx of newcomers. Bozeman, for instance, has become more liberal as it has grown, while Kalispell’s conservative bent has intensified.

The two U.S. Senate seats are frequently split by party. Sen. Jon Tester (D) comfortably won reelection in 2018, but this year’s matchup between two-term Gov. Steve Bullock (D) and incumbent Sen. Steve Daines (R) has turned into one of the closest and biggest-money Senate races in the country.

That has meant less attention to the governor’s race, which is arguably more important to the state’s future. Democrats have occupied the governor’s office for the past 16 years, yet with a Republican-controlled legislature likely to hold, a Republican governor could undo more moderate policies on health care, public schools funding and labor protections.

Gianforte was defeated in his initial run four years ago. The next year, he attracted national attention when he assaulted a reporter while campaigning for a special House election and initially denied the incident before apologizing. He was elected to Montana’s lone congressional seat with barely 50 percent of the vote and was reelected by almost the same margin in 2018.

His job approval ratings continue to lag. Despite a statewide mask mandate, he has been photographed at political events wearing no mask — most notably at a “Let Freedom Ring” concert in early October that has been linked to confirmed coronavirus infections. In a debate around the same time, as Montana’s cases started to spike, he said he would rely on personal responsibility to combat the coronavirus. Cooney said he would be guided by “science and the best medical practices.”

Gianforte’s campaign declined multiple requests for an interview with the candidate. “As a general rule,” it responded via email, “our campaign has chosen to dedicate our time and attention exclusively to Montana press.”

Montana reporters, however, say their own time and access to him have been limited.

Sally Mauk, a veteran state politics reporter and analyst with Montana Public Radio in Missoula, said skirting the press and general public has allowed Gianforte to present himself as more of a moderate Republican than his past statements and voting record in Washington indicate.

“His popularity in Montana, if you can call it that, is that he comes off as ‘I’m going to be your economic messiah,’ and that message really resonates right now because of the pandemic,” Mauk said. But if he is elected governor, she said she expects a far different administration. “He will do it in a way the state has never experienced,” Mauk said. “He’ll be very conservative on social and cultural issues.”

Cooney is hammering away at a traditional Montana Democrat message that has worked for others — a slate of issues topped by opposition to any privatization of public lands, greater funding for public education and more protections for labor. He stresses that the governor’s office will be critical to managing the pandemic in months to come and in sending clear messages about basic protections such as masks.

“We need to basically set an example, so that Montanans who are getting tired of this understand that we have to continue to fight this thing and it is serious, and people will get sick and people will continue to die,” he said in an interview. “The economy will not recover if we don’t keep Montana healthy.”

Cooney isn’t a flashy candidate, and despite his statewide office, a survey this summer found that 48 percent of voters weren’t sure what they thought of him. Mauk calls him “a bit of an enigma.”

“He’s someone who has been in public life in Montana for over four decades, and I still have people ask me what he’s really like. That’s telling, isn’t it?” she said.

Gianforte’s campaign raised $6.9 million through September, $3 million from his own pockets. That was more than double the $2.5 million Cooney raised with no self-funding. Some big names have gotten involved of late. Vice President Pence visited in September to stump for Gianforte and other Republicans, and part-time Montana resident David Letterman and Montana-born actors Michelle Williams and Jesse Tyler Ferguson are hosting a virtual fundraiser for Cooney on Monday.

For some Republicans here, the GOP’s veer to the right has gone too far. Bob Brown, a former state legislator, secretary of state and 2004 nominee for governor, says the politics of Trump, Gianforte and Daines have left his party unrecognizable.

“The Republican Party in Montana has become part of the national trend,” he said. “It’s been moving in that direction for a long time.”

Brown decided this year that it left him little choice; he declared himself an independent. He voted Friday for more Democrats than in any previous election, he said — including the Democrat for governor.

Correction: An earlier version of this story incorrectly identified Mike Cooney, who was born in Washington, D.C., as a Montana native. It also incorrectly stated that the recent Treasure State poll showed the difference between the two candidates’ support among voters was just outside the margin of error; instead, the gap was just inside that margin of error.