In an election already beyond belief, one of the biggest surprises is unfolding in Utah, a deep-red state where Donald Trump is struggling to secure a Republican victory and a political nobody is surging in the polls.

As Mr. Trump and his Democratic rival, Hillary Clinton, prepare for their final debate confrontation on Wednesday evening, a large chunk of voters in Utah are sending a different message: neither of the above.

The revolt against Mr. Trump's candidacy has been months in the making. His rhetoric about Muslims, immigrants and refugees has long disturbed the state's Mormon voters, who make up more than half of the electorate. But the release of a video this month in which Mr. Trump brags about groping women has opened the door for an unprecedented outcome in November.

Story continues below advertisement

Read more: Trump has crashed the Republican Party, and it'll never be the same

Trumpland: How this Pennsylvania county learned to love the Donald

In a normal presidential campaign, Utah votes Republican in large numbers. "Any Republican with a pulse should be able to get into the 60-per-cent range" in Utah, says Quin Monson, a professor of political science at Brigham Young University. Mr. Trump's recent performance in polls represents "a meltdown of epic proportions."

Two surveys in the last two weeks have shown that the race in Utah is effectively a three-way tie. A poll released Monday by Rasmussen Reports found Mr. Trump, Ms. Clinton and a first-time candidate named Evan McMullin each taking roughly 30 per cent of the vote. Mr. McMullin is a 40-year-old Utah native who once worked for U.S. House Republicans and for the Central Intelligence Agency. He launched his campaign in August. If he does manage to win Utah, it would be the first time in 48 years that an independent candidate has won electoral votes in a presidential contest.

Story continues below advertisement

Utah is one of several states where Mr. Trump's candidacy is unsettling the electoral map. In Arizona, for instance, where Republicans have prevailed in nine of the last 10 presidential contests, Ms. Clinton is drawing closer to Mr. Trump.

But Utah is the only place where an independent has a fair chance of winning. People in Utah "are voting their conscience and their values, rather than their potential political clout," says Steven Zobell, a 69-year-old retiree in Provo. He's planning to vote either for Mr. McMullin or for Gary Johnson, the Libertarian Party candidate. "Neither one is terribly impressive, but at least it's a choice."

The enthusiasm for Mr. McMullin is more palpable up the road at Brigham Young University. It's owned by the Church of Jesus Christ of Latter-day Saints, the Mormon Church, and nearly all the students are Mormon. As bells peal from a tower and crisp autumn air flows down from the Wasatch mountain range, the grubbiness of the presidential race feels far away.

Emily Hoffman, 22, voted for Ted Cruz in the Republican primary but is doing everything she can to support Mr. McMullin. "He's a good person who has integrity and will defend the Constitution. I just felt like I could trust him," she says. Mr. Trump "is foul-mouthed and doesn't respect women and that's not how a president should be."

Story continues below advertisement

Mr. McMullin is "sober and humble and even though it's not exciting, it's probably what we need," adds Daniel Montez, 26, a graduate student at BYU. A few weeks ago, he joined the campaign as a volunteer and last Friday, he helped hand out 5,000 flyers for Mr. McMullin at a football game. "It shows people that you don't have to be afraid to vote for someone else – that you don't have to be afraid to do what you believe in."

Mr. Trump has spent much of his campaign saying things that alienate Mormons. As a religious minority with a not-so-distant history of persecution and displacement, Mormons are sensitive to anything that attacks refugees or sounds like discrimination on the basis of religion.

Prof. Monson, the political scientist at BYU, notes that stories are passed down within his own family about the journey his ancestors made to Utah in the mid-19th century, pulling handcarts and facing violent mobs along the way. "No one really uses the term 'religious refugees,' but that's what we were," he says.

Utah is the only state with a Republican governor to reaffirm that it welcomes Syrian refugees. In recent years, Mormon leaders have also advocated a moderate approach to immigration reform in the United States, a reflection both of the church's values and its increasingly diverse membership.

Story continues below advertisement

"A lot of the rhetoric that demonizes or divides just doesn't resonate" in Utah, says Boyd Matheson, a former chief of staff to U.S. Senator Mike Lee and president of the Sutherland Institute, a conservative think tank in Salt Lake City.

In an environment where Mr. Trump was viewed with distaste, the release of the 2005 video of him bragging about sexually assaulting women put him beyond the pale for many voters. A day after the video emerged, the Deseret News, a newspaper owned by the Mormon Church, printed a scathing editorial calling on Mr. Trump to withdraw from the race.

"What oozes from this audio is evil," the paper wrote. Mr. Trump's rhetoric "belies a willingness to use and discard other human beings at will," a characteristic that is "the essence of a despot."

Democrats in Utah are watching the developments with cautious optimism. They're under no illusion that Ms. Clinton – who is widely distrusted and disliked here – is growing in popularity. But a win by an independent might help disrupt the long Republican stranglehold on the state's politics.

Some Utah voters express a dislike of Mr. Trump but say they'll probably vote for him because their biggest priority is protecting a conservative majority on the U.S. Supreme Court. That majority, they believe, is critical to preserving the rights of gun owners and restrictions on abortions.

Story continues below advertisement

"I can't defend half of his policies and three-quarters of what he says on TV makes no sense," says Norman Thurston, a member of Utah's state legislature, of Mr. Trump. But if the choice is between Mr. Trump and Ms. Clinton, Mr. Thurston will vote for the former because of the president's role in nominating Supreme Court justices.

Still, Mr. Thurston is keeping a close watch on Mr. McMullin's campaign. He attended a packed event that Mr. McMullin recently held in Provo and was startled to see hundreds more people waiting to get in. If Mr. McMullin maintains his surge in the polls, indicating he could actually win the state, "then I would have to take a serious look at who he is and what he stands for," Mr. Thurston says.

"The message that Utah is sending is we want something better," says Prof. Monson. "Evan McMullin is a perfectly good vehicle to make that statement. He's not ready to be – or going to be – president, but do people think he's a decent human being? Yes."