Joe Manchin has plenty of opponents in West Virginia. Soon he’ll learn who the main one is. On Tuesday, a GOP primary will determine which Republican Senate candidate will get to call Manchin, the Democratic incumbent, a Washington, D.C., sellout for the next six months. In a state that President Trump won with 68 percent of the vote in 2016, the race promises to be one of the most closely watched contests of the 2018 midterm cycle. The question of who is best suited to carry out West Virginia’s vision of itself as a thumb in Washington’s eye seems likely to dominate.

There are three top GOP contenders vying for the nomination: U.S. Rep. Evan Jenkins, state Attorney General Patrick Morrisey and former Massey Energy CEO Don Blankenship. No candidate has a clear upper hand. There’s been only one public poll of the race, a Fox News survey of likely Republican primary voters conducted April 18-22. Jenkins led with 25 percent of the vote, followed by Morrisey with 21 percent and Blankenship with 16 percent. But 24 percent of respondents were still undecided, a high number that suggests plenty could change before the election.

Jenkins, a former House of Delegates member who, if you squint, looks a bit like the actor Dennis Quaid, touts his bona fides as a West Virginian through and through. It’s perhaps a not-so-subtle nod to the fact that Morrisey was not born in the state and bought a house there in 2006. (When Morrisey filed to run for attorney general in 2010, he was working for a D.C. law firm.)

Morrisey, the state’s first Republican attorney general since the 1930s, is trying to make hay of the fact that Jenkins was once a Democrat — he switched parties in 2013. In Morrisey’s attacks, Jenkins is a “deceitful liberal” and a “flip-flopper.” Morrisey has received endorsements from national Republicans like Sens. Rand Paul and Ted Cruz, along with the National Review.

And then there is Don Blankenship.

Blankenship’s entry into the race caught national attention for good reason. The former coal executive only recently completed a yearlong jail sentence for conspiring to violate federal mine safety standards after an explosion at the Upper Big Branch Mine that killed 29. He’s positioning himself as the race’s political outsider, a development that has seemed to dismay the Republican establishment — both in West Virginia and nationally. (In a recent ad, Blankenship somewhat puzzlingly bestowed Senate Majority Leader Mitch McConnell with the moniker “Cocaine Mitch,” and he said in a debate that he didn’t intend to get along with GOP leadership if he got to the Senate.) But Jenkins and Morrisey have largely avoided directing attacks at Blankenship. Instead, ads backed by the well-funded Mountain Families PAC have brought up Blankenship’s conviction and his company pumping coal slurry into the ground.

The race exemplifies the political dynamics that have shifted West Virginia from historic Democratic stronghold to bastion of conservatism. Jenkins’s party switch is emblematic of many West Virginians’ own changing party affiliations. In November 2008, when John McCain won West Virginia with 56 percent of the vote, 55 percent of West Virginia voters were registered Democrats and 30 percent were Republicans. As of April 2018, Democrats were down to just 43 percent of the state’s registered voters. While Republican registration was up only slightly, to 32 percent, those with no party affiliation have increased dramatically in the state. In 2008, only 14 percent of registered voters were unaffiliated, but in 2018, that number was 22 percent. One high-profile recent example of a Democratic Party defector? The state’s current governor, Jim Justice, who was elected as a Democrat but became a Republican last year. (Despite his party switch, Justice said he would support Manchin in the Senate race.)

And while party identification might be in flux in the state, Trump’s popularity is not — 61 percent of the state’s residents approved of his job performance in 2017, according to a Gallup poll. There’s a narcissism-of-small-differences whiff to the primary; the top three candidates have gone out of their way to demonstrate proper fealty to the president or at least the president’s cause, as with one Jenkins ad spot: “Working with Trump. West Virginia values. Evan Jenkins.” Morrisey, who didn’t endorse Trump until around the GOP convention, has used a drain-the-swamp message. One ad shows a West Virginia mountain crushing the Capitol building: “Let’s not just change Washington, let’s blow it up and reinvent it.” Blankenship, meanwhile, said in a debate that he was “Trumpier than Trump” and has run an ad saying, “We need to arrest Hillary.”

Hillary Clinton isn’t the only national Democratic figure to be invoked in the GOP race — former President Obama is also a frequent target of attacks ads (as, of course, is Manchin). Obama’s unpopularity in the state may account for some of the favorable view of Blankenship. “I think Don makes good points, especially to our primary electorate, that he was kind of railroaded in the trial” after the Upper Big Branch explosion, state GOP operative Phalen Kuckuck told FiveThirtyEight. “If you hit him for that, he can just say, ‘I was put in jail by the Obama judges.’” West Virginia Republican primary voters, Kuckuck said, “care about defending unborn life, supporting President Trump’s agenda and supporting and defending the coal industry.”

Given the decline of the West Virginia Democratic base, Manchin will have to pay attention to these concerns as well in a general election, no matter whom he faces out of the Republican primary. (Manchin is being challenged in the Democratic primary by activist Paula Jean Swearengin.) The Fox poll showed that Manchin has a decent approval of 35 percent among the state’s Republican primary voters. This relatively positive result contrasts with a recent Morning Consult survey tracking the popularity of U.S. senators, which showed that 43 percent of respondents approved of Manchin, “a net slide of 17 points from fourth quarter, the biggest decline of any senator during that period.” The most recent state poll tracking Manchin’s approval was in the summer of 2017 and put it at 51 percent overall.

Manchin’s unsteady approval ratings and the competitive Republican primary serve to demonstrate the unsettled mood — on both sides of the aisle — that has fallen over West Virginia politics in the Trump era. Tuesday’s primary could mark another twist if Blankenship prevails. Republicans fear his win in the primary would give Manchin a vulnerable opponent — one who would allow him to stay in the Senate, even with Trump in the White House.