Speaking at his first rally since he was accused of sexual misconduct and unwanted advances involving teenage girls, Alabama Republican Senate candidate Roy Moore was unapologetic during an appearance in DeKalb County, an area that last voted for a Democratic presidential candidate in 1976. After a Baptist preacher thanked God for Moore, and the head of the county Republican party declared the election a “spiritual battle,” Moore stood to deliver a 30-minute speech, quoting from scripture, the U.S. Constitution, and Rudyard Kipling. He enunciated his opposition to abortion and transgender rights, touched on immigration and increased military spending, and flatly denied the accusations against him. “I do not know these women,” he said of the more than half-dozen alleged victims. “And I have never engaged in sexual misconduct with anyone. This is simply dirty politics.”

While the rest of the Republican Party is holding its nose, Donald Trump has, after some hesitation, effectively endorsed Moore’s campaign. “He says it didn’t happen. And, you know, you have to listen to him also,” he told reporters last week, after privately questioning the veracity of the accusations for days. The president’s support for the alleged child predator has its limits: “Trump is not planning a trip to Alabama at any time, and, frankly, his schedule doesn’t permit him doing anything between now and Election Day,” said Sarah Huckabee Sanders. Still, the shared experience tying the two men is clear, and the route of Trump’s skepticism isn’t difficult to trace. During the 2016 campaign, more than a dozen women came forward to accuse him of sexual harassment and other misconduct spanning decades. These women, Trump maintains, are all lying.

The political calculus for Trump, in standing by Moore, is less obvious than any personal affinity. Indeed, polls show Moore losing ground to his Democratic rival Doug Jones, who Trump recently slammed on Twitter as “a Schumer/Pelosi puppet who is WEAK on Crime, WEAK on the Border, Bad for our Military and our great Vets, Bad for our 2nd Amendment, AND WANTS TO RAISES TAXES TO THE SKY.” As Politico notes, over the course of the campaign, Jones has spent $5.6 million on TV ads in comparison to Moore’s $800,000. Since the accusations arose, the Democrat has been saturating the airwaves with ads hammering Moore as a child predator. In contrast, in his quest to win over wavering Republicans and suburban women, Jones has been careful to frame himself as a reliable pragmatist willing to work across the aisle with Republicans—a key tenet of his strategy.

There is a chance that Jones's well-funded strategy could play right into Moore's hands, bolstering the theocrat’s suggestion in one of his own ads that Jones and an alliance of “liberal elites and the Republican establishment” are working together to protect “their Big-Government trough.” The second reason for the White House announcing that Trump will not be going down to Alabama, then, could be that they have surveyed the situation, and are confident that Moore can win without their overt help, and thus without the danger of annoying the upper echelons of the G.O.P. After all, a raging culture war featuring a bellicose, Steve Bannon-supported Republican, accusations of sexual assault and a well-funded opponent is all familiar territory. It’s the same pattern that Trump controlled to win the White House.

Trump’s involvement, one way or the other, may not matter much to Moore. The conspiracy-slinging Alabamian has been cultivating what is now-known as Trumpism for 25 years, battling the political establishment and championing far-right evangelical causes in the days when Trump was still a Democrat. As on-the-ground interviews have repeatedly shown, Moore disciples seem largely unswayed by the allegations of sexual assault. The larger question is whether Moore’s toxicity in Washington will affix itself to Trump, drawing attention to his own lascivious past. In the recent Virginia gubernatorial election, women voters shifted Democratic in exit polls by 5 points, after a campaign that was framed as a referendum on Trump. If Trump’s 2016 coalition of white suburban women begins leaning blue at the national level, the G.O.P. may have a major math problem on its hands. The results of Alabama’s own special election, in two weeks’ time, will be instructive.