Roy Moore has been abandoned by Republican leadership in Congress, the Republican National Committee and even some national evangelical leaders. But the embattled Alabama Senate candidate, who is facing allegations that he sexually assaulted, harassed or made sexual advances toward teenagers, still appears to have the support of a big chunk of his base ahead of the special election being held on Dec. 12: Alabama’s white evangelical Protestants.

A JMC Analytics and Polling survey conducted in the immediate aftermath of the first set of allegations found that most evangelicals (71 percent) said they wouldn’t dissuade them from voting for Moore. A week after the initial allegations were leveled, Moore appeared at a news conference with a group of national Christian conservative leaders. During the conference, they presented a letter praising Moore as a “man of integrity who has never wavered from his valiant defense of the unborn, the Ten Commandments, and the Constitution.”

In a state where 35 percent of the population identifies as white evangelical Protestant, the continued support of this constituency will be essential for Moore, who so far has refused calls from party elders to leave the race. Moore has lost some support among Alabama evangelical voters since the allegations surfaced, but not a lot — he dropped by only 6 percentage points among evangelicals in the JMC poll. This constituency’s loyalty to a man who is accused of preying on teenage girls might seem like a head-scratcher, or even hypocritical, coming as it does from the ranks of “values voters,” who place issues related to traditional sexual morality at the heart of their political agenda. But there are several reasons that are consistent with their political history and worldview that explain why they’ve decided — so far — to double down on Moore.

“Values voters” — a label that emerged to describe conservative Christians during the 2004 election — are sometimes held up as prioritizing candidate character, meaning whether a candidate personally embodies Christian values such as kindness, honesty and forgiveness. But although personal character is important, evangelicals’ first priority is to elect politicians who will fight for them and advance their agenda on the issues they care about.

This was clear even in 2004, when “moral values” was added by exit pollsters to the list of issues that voters could identify as the top motivator for their choice of candidate. Of the people who chose “moral values,” 80 percent voted for George W. Bush in the presidential election, prompting speculation that his genuine, personal discussion of his faith on the campaign trail had helped drive evangelical support. But were Bush’s personal faith and religious convictions the motivator, or were voters referring to specific policy positions that were undergirded by their own religious faith?

Subsequent research indicated that the latter was more common. In a survey conducted just after the 2004 election, Pew asked voters who said moral values were the most important issue to them in the election what concerns fell under the umbrella of “moral values.” Forty-four percent mentioned specific issues like abortion or gay marriage, while 23 percent referenced personal characteristics of the candidates. (The rest referred in more general terms to Christianity or “traditional values.”)

According to a 2015 survey conducted by the Barna Group, a research organization that focuses on Christian trends, 58 percent of evangelicals said that candidates’ stances on the issues were a key factor for their presidential vote, while less than half said the same of a candidate’s character (46 percent) or religious faith (45 percent). Robert Jeffress, a prominent Christian conservative supporter of Donald Trump, told The Washington Post that for evangelicals, character matters, but “leadership, experience, morality and faith are all important, and the rank of those changes according to circumstances.”

“Values voters” was, for the most part, a new and catchy label for a phenomenon that had already existed for at least 10 years. Beginning in the late 1980s and early 1990s, influential Christian conservative leaders like Pat Robertson and Ralph Reed urged politicians to protect “family values” — i.e. the two-parent, heterosexual, Christian nuclear family — from incursions by secularism, feminism and moral relativism. They translated the “moral values” agenda into a loose set of issues that included abortion, homosexuality, school vouchers and pornography restrictions.

The policy goals that fall under the umbrella of “family values” or “moral values” are largely social and cultural, and they remain high political priorities for evangelicals. When asked in the same Barna survey which issues will have “a lot” of impact on candidate selection, evangelicals were about as likely to cite abortion (64 percent) and religious liberty (67 percent) as the economy (69 percent).

Concerns about religious liberty in particular — which has become associated in recent years with Christians’ desire to opt out of laws that they believe require them to personally sanction gay marriage — are increasingly salient for evangelicals. In a different poll conducted by Barna in 2015, 77 percent of evangelicals said religious freedom in the U.S. had grown worse over the past 10 years, and 68 percent said they agreed that “the gay and lesbian community is the most active group trying to remove Christian values from the country.”

Many evangelical Christians believe that these values are increasingly threatened. A poll conducted by the Baptist-affiliated LifeWay Research in September 2015 found that 71 percent of evangelicals believe religious liberty is on the decline and that 82 percent of evangelicals say Christians face increasing intolerance. Another LifeWay survey, this one conducted in 2016, found that 72 percent of evangelicals believe that too many laws about moral standards have been removed. And data from the Public Religion Research Institute shows that the share of evangelicals who agree that the country used to be a Christian nation but is not anymore increased between 2010 and 2015.

This sense of cultural embattlement among evangelicals, and thus the importance of prioritizing the political issues that promote their way of life, is also visible in evangelicals’ attitudes toward the federal government and the Democratic Party. Many evangelicals describe themselves as “frustrated” (87 percent) or “angry” (63 percent) with the federal government, according to a Barna poll from last year, and only 14 percent say they are well-served by the federal government. Meanwhile, they are also highly partisan: Members of the largest evangelical denominations are overwhelmingly likely to favor Republican candidates, according to a Pew analysis from last year. And PRRI surveys have shown that they have negative views of the Democrats. Nearly half (47 percent) of white evangelical Protestants reported last year that the Democrats are so misguided that they pose a serious threat to the country.

For years, Roy Moore has positioned himself as a tenacious advocate for conservative Christian priorities like opposition to gay rights and abortion — even in the face of resistance from the government. He has twice been removed from his position as chief justice of the Alabama Supreme Court. First, he refused to comply with a federal judicial order to take down a monument to the Ten Commandments that he erected in the Supreme Court courthouse. Later, after again being elected to the post, he ordered lower court judges to refuse to issue marriage licenses to same-sex couples in defiance of the U.S. Supreme Court’s ruling that gay couples have a constitutional right to marry.

On the campaign trail, Moore has denied the existence of evolution (57 percent of evangelicals do as well). He has said that Ronald Reagan’s famous statement about the Soviet Union being “the focus of evil in the modern world” could apply to the U.S. — when asked for an example, he pointed to the legalization of same-sex marriage. Moore has suggested that the 9/11 attacks may have been a punishment from God because abortion and sodomy are legal. He called the 2015 Supreme Court decision legalizing gay marriage “even worse” than the 1857 decision in the Dred Scott case, which found that African-Americans were property and not citizens. The idea of electing a senator who does not oppose abortion appears to be particularly troubling for some Alabama evangelicals. “I don’t want to vote for a creep, but I also don’t vote for Democrats,” Charlene Buttram, who is married to a pastor in a town southeast of Birmingham, told the Los Angeles Times. “I don’t believe in abortion.”

When the allegations against him first emerged, Moore declared that he and his followers were in a “spiritual battle with those who want to silence our message.” In a rally last week, he said, “I want to speak the truth — I want to take the truth about God to our Capitol.”

Moore’s candidacy is increasingly in jeopardy — one recent poll showed his Democratic opponent, Doug Jones, ahead by 8 points among likely voters. But Moore’s message of defiance is one that could still resonate among his evangelical base: They’re already distrustful and hostile toward what they see as an increasingly secular and immoral establishment and prioritize supporting a candidate who has a proven track record on the issues they care about.

“For evangelicals, Moore is the ultimate champion of the values mandated by biblical Christianity,” said Geoffrey Layman, a political science professor at the University of Notre Dame who studies religion and politics. “He’s established himself as someone who will fight for them even at great personal cost.”