Controversial conservative and former Alabama chief justice Roy Moore won the Republican primary for the state's Senate seat on Sept. 26, setting up a crisis within the GOP. Here's a look at three problems his win poses for the D.C. establishment. (Jenny Starrs/The Washington Post)

This post has been updated.

Alabama voters on Tuesday threw the U.S. Senate a curveball — a curveball in the form of Roy Moore, the former state Supreme Court justice whose dual tenures in that job both ended in massive controversy and his removal.

Moore led appointed Sen. Luther Strange 57 to 43 percent with 43 percent of precincts reporting. The race has been called for Moore, who will be the favorite in the December special election for U.S. Attorney General Jeff Sessions’s old Senate seat.

There is a ton to unpack in this result. Let’s do it via winners and losers.

Losers first.

LOSERS

President Trump

The president chose sides, and he chose wrong. And not only that, but his support for Strange didn’t seem to have any positive impact — even in a state that loves Trump. Trump repeatedly insisted that his endorsement helped Strange’s poll numbers, but that just didn’t show up in the polls or the final results. Moore beat Strange by six points in the primary, and early runoff polls before the endorsement showed him with a small lead. That lead never really dissipated despite Trump’s endorsement. Trump seemed to regret his endorsement even as he was campaigning for Strange in recent days; now we know why.

Mitch McConnell

If there was one attack that sank Strange in this race, it may well have been tying him to the Senate majority leader. Trump’s advocacy on Strange’s behalf basically boiled down to repeated assurances that Strange didn’t even really know McConnell — and thus couldn’t be his puppet. Trump acknowledged in a local radio interview Monday that “Mitch is not, polling-wise, the most popular guy in this country.” Trump largely has himself to blame (or thank) for that, given that McConnell’s numbers have tanked amid Trump’s criticism of him. And not only was McConnell used as a cudgel, but now he likely has to deal with the complete wild card that will be Sen. Roy Moore (R-Ala.) — or the loss of a seat to the Democrats. It’s something of an open question as to which he should prefer, but neither seems a good option.

The Alabama Court of the Judiciary

This is the panel that twice effectively removed Moore from the state Supreme Court — first in 2003 for defying an order to remove his own monument to the Ten Commandments from the Alabama Judicial Building, then last year for flouting the federal ruling in favor of same-sex marriage after he was reinstalled as chief justice (he was suspended and later resigned). What this panel has now twice done, Alabama voters have undone — assuming Moore wins in the special election, of course.

The GOP’s health-care effort

One the of the most relevant differences between the two candidates today was Strange’s qualified support for the GOP’s most recent health-care bill and Moore’s opposition to it. Given that polls show not even GOP voters were enthused about the various attempts at replacing Obamacare, perhaps it’s not surprising that primary voters in Alabama didn’t punish Moore for that. This wasn’t really a huge point of emphasis in the race, but that’s also kind of the point: President Trump and GOP leaders wanted to paint opponents of the GOP’s bills as opposing repeal, and a candidate who flouted that ultimatum just won. It also appropriately came the day after the GOP’s replacement efforts likely failed for the final time this Congress.

WINNERS

Trump’s ethos

Trump may have chosen the wrong horse, but it’s easy to argue that his sensibilities won the day. Moore ran as an unapologetic opponent of the GOP establishment, and he had the backing of some of the same forces — i.e. Stephen K. Bannon, Breitbart, and even Trump’s own Cabinet secretary, Ben Carson — that symbolized Trump’s election. Trump is a guy who has repeatedly flouted political norms and challenged the judiciary, and that’s clearly Moore’s calling card, too. If Trump was a middle finger to the GOP establishment and political process last year, Moore is the middle finger on the other hand. It’s yet another signal that whatever the GOP establishment wants, the GOP base is prone to giving it the opposite.

Doug Jones and the Democrats

You may not know this name, but there’s a decent chance you will come Dec. 12. Moore is a hugely divisive figure, and special elections often open the door to competitive races in places they usually don’t happen (see: Massachusetts 2010; the Democrats in the South in the late 2000s). Jones carves a legitimate profile as a former U.S. attorney, and Democrats will undoubtedly be monitoring this race for a potentially shocking upset and a winnowing of the GOP majority to 51-49. Worth noting: One poll earlier this month had Jones within four points of Moore, Moore won his last statewide campaign (in 2012) by just two points, and none other than Trump has suggested Moore would have a much more difficult time winning the seat than Strange would have. Trump’s political analysis is often faulty, but plenty would agree with that. “It may put the seat in play if Moore wins,” GOP pollster Whit Ayres told CNBC.

Second (and third) political chances

Moore’s win isn’t just his latest comeback from a judicial rebuke; it’s a statement win after two lackluster nonjudicial statewide campaigns. Moore lost the GOP primary for governor 2-to-1 to incumbent Gov. Bob Riley (R) in 2006 and finished fourth (!) in the primary during the open 2010 governor’s race. Moore looks like he could join Georgia special election winner Rep. Karen Handel (R) in losing multiple bids for high-profile statewide office and then winning a much-watched special election.

Conspiracy theories

Moore has been a birther (though unlike Trump he hasn’t renounced it), suggested President Barack Obama was a Muslim, and said the Sept. 11, 2001, attacks were punishment from God. He has compared a congressman taking the oath of office on a Koran to doing so on Hitler’s “Mein Kampf.” He has also served as a columnist at the conspiracy-theory site World Net Daily. He even said Tuesday that there is sharia law in the United States right now — "as I understand it, in Illinois, Indiana." Yes, President Trump has latched on to some of this stuff, but the sum total has no precedent in recent American politics.