Skepticism of the establishment served the Republican Party well for a long time. Framing government, in particular, as wasteful and bloated effectively mobilized Republican voters to support cuts to spending and to focus on slashing taxes. Depicting the electoral system as rife with fraud helped make the case for new voter ID laws that often had the happy side effect of tamping down turnout from Democratic-leaning voters.

The only problem, made apparent with the advent of the tea party, was that the Republican Party itself was part of the establishment. GOP voters didn’t need much convincing that the corruption in D.C. power structures included Republican leaders themselves, but hyper-conservative media outlets stoked those feelings anyway. That led to a struggle over several election cycles as Republican incumbents fought off outsider challengers often using the weird strategy of ignoring their own records in office.

After the establishment largely subsumed the outsider surge, 2016 happened. An improbable non-politician came to the forefront thanks to an affection for saying precisely the sorts of things Republican candidates weren’t supposed to say — but that those partisan media outlets strongly encouraged — and for otherwise thumbing his nose at everything that came before. Donald Trump won the party’s nomination thanks to a core, fervent, anti-establishment base and won the presidency as Republican voters figured that a guy who might conceivably blow up their party was still better than Hillary Clinton.

Outside of that context, the candidacy of Roy Moore to represent Alabama in the U.S. Senate takes on a different sheen. A guy twice removed from the state Supreme Court for refusing to uphold judicial mandates is certainly an outsider’s outsider. Had he run for the Senate at a moment when Republicans weren’t embracing outsiders and those willing to challenge norms, however, it’s easy to see how he might not have won the GOP primary at all.

Earlier this month, Moore did something even more unusual for a Republican in Alabama: He lost. Thanks in part to a Democratic voting base motivated by opposition to Moore and Trump — and thanks in part, it seems, to accusations that Moore initiated sexual contact with a 14-year-old in 1979 — Democrat Doug Jones beat Moore by 1.5 percentage points to earn the right to represent the state in the Senate.

No one should be surprised by what happened next. On Wednesday night, Moore filed a lawsuit hoping to block the certification of the results of that election. His argument? Voter fraud.

We can dispatch with his actual claims fairly quickly. They depend on the same sort of nebulous nefariousness Trump warned about in 2016 when it seemed likely that he would lose to Clinton: Democratic no-good-niks driving across state lines and casting just enough ballots to sway the result. As with Trump’s assertions both before and after his victory — the latter offered to explain away why Trump lost the popular vote — Moore’s claim of rampant fraud lacks any smoking gun that something untoward happened, relying instead on one guy’s television interview (already investigated and dismissed by Alabama’s secretary of state) and one poll worker’s declaration that she saw more out-of-state driver’s licenses than in years past.

There is a mathematical claim made in Moore’s lawsuit. His team contends that 20 precincts in Jefferson County saw an unusual break between the number of people who voted the Republican party line (an option in the state) and those who voted for him. In many of those “anomalous precincts” (as the suit calls them), Moore earned much more support from those who voted the straight party line than among those who cast individual votes in the Senate race. The implication in the suit is that this is evidence of the vote being bolstered for Jones in those precincts — to the tune of 13,000 extra votes, which, had those votes gone the other way, would have flipped the results of the election by 26,000 votes (Jones down 13,000; Moore up 13,000). That’s more than the 20,000-vote difference in the race.

There’s a lot that’s wrong with that claim. The first is that if these votes were fraudulent, it doesn’t make sense to contend that they should have gone the other way. The second is that arguments for voter fraud affecting election results often claim just enough fraud to have swung the thing, as though the fraudsters had such a sophisticated model of the election that they knew they’d need 13,000 more votes in that particular place to ensure a 1.5-point overall margin and avoid a recount. (They also have a sophisticated bus-people-across-state-lines-and-to-polling-places-in-the-middle-of-Alabama-instead-of-near-the-border-for-some-reason system that is completely undetectable.) The third problem, of course, is that in-person voter fraud seldom happens, despite incessant insistences that it does (even though no widespread orchestrated fraud effort has ever been uncovered).

The data analysis in the lawsuit itself, though, raises questions about the assertion that fraud is responsible for those anomalies. For example, consider this graph:

It shows that there were many more write-in ballots in the “anomalous” precincts than in the rest of the state. That doesn’t fit with Moore’s thesis, though: Why would fraudsters go write someone in instead of just voting for Jones? It suggests that maybe there’s another explanation.

Another graph from the lawsuit:

This is confusing, but the upshot is that the “anomalies” occurred in more heavily white precincts. Why? In part because in more heavily black precincts, support for Jones was heavy. In other precincts, views were more mixed. In fact, the U.S. Elections Project’s Michael McDonald determined that the “anomalous” precincts were those in which the results were the most contested. The implication is not that those precincts were home to fraud, but, instead, that those were places where voters were iffy about voting for Moore. If you’re a Republican who chooses not to vote the party line, perhaps there’s a reason: You don’t want to cast a vote for Moore. Perhaps you voted for Jones. Perhaps you wrote someone in. Either way, a place with a lot of Republicans who were skeptical about Moore would probably see the sorts of splits indicated by these “anomalies.”

There are all sorts of other problems with Moore’s lawsuit, including the claim that early exit polls are highly accurate (that’s not how it works) or that a Democratic PAC’s efforts to boost turnout for Jones with ads somehow constituted fraud. He claims that polls before Election Day showed him winning, as though that meant he should win — and as though that’s what most said, which isn’t the case. The suit is a grab bag attempt to cobble together an insinuation far more than it is a robust depiction of fraud.

This brings us back to our original point, though. Moore is simply leveraging a skepticism that his party fostered for years. In a Post-ABC News poll conducted in September 2016, 6 in 10 Republicans and 7 in 10 Trump voters said they thought voter fraud happened very or somewhat often. Moore’s campaign leveraged antipathy to the Republican establishment in the form of Senate Majority Leader Mitch McConnell (Ky.) in an effort to solidify support before Election Day; he’s leveraging skepticism about the accuracy of vote-counting to try to keep his campaign alive. Many of his supporters will probably accept his loose-knit arguments, as will some who don’t support him, simply because they accept that in-person fraud happens a lot.

Mind you, Alabama is a state with a voter ID law. People with out-of-state licenses can vote, but they have to match a registered voter in the state. Alabama already passed the sort of law the GOP argued was necessary, but the party’s U.S. Senate candidate still claims there was fraud.

Moore was a historically bad candidate running in an election during an extremely bad year for Republican candidates. But his candidacy, from start to finish — and then for weeks after the finish — took advantage of an environment of doubt fostered by the GOP. Trump did, too, and had he not squeaked out a 78,000-vote margin in Michigan, Pennsylvania and Wisconsin in November 2016, he would probably have taken a tack similar to Moore’s.

It serves Republicans well to pass laws limiting the ability of Democrats to vote legally, but it also continues to reinforce an unsupported argument that the system itself is flawed. As half of that system, that’s not always helpful to the Republican Party.