Alabama was once a solidly blue state -- until 1994, when Sen. Richard Shelby switched parties after being elected as a Democrat. Since then, no Democrat has won a major statewide office. But Tuesday night, Alabama voters narrowly elected Democrat Doug Jones to the Senate, in the most shocking election result since Donald Trump’s presidential victory more than one year ago.

Tuesday’s election is exactly why Democrats need to have credible candidates in every race to take advantage of unexpected opportunities. When Republican candidate Roy Moore rode his horse, Sassy, to the polls to cast his vote in the special election this morning, he was heavily favored to win the seat first left vacant when Jeff Sessions left his Senate seat after 20 years to serve as attorney general.

Advertisement:

Almost entirely thanks to black voters, a pro-choice Democrat whose most notable career accomplishment is the prosecution of Ku Klux Klan members was elected to represent one of the most solidly Republican states in the country. Eleven Alabama counties went from red in 2016, when Trump carried the state over Hillary Clinton by an overwhelming margin, to blue in 2017.

“No Republicans in Birmingham are celebrating,” the Birmingham News noted as it reported on a dearth of election-night watch parties in support of Republican Roy Moore.

Moore, who was twice removed from his position as chief justice of the state Supreme Court, both times for flouting federal law, last won office after a hard-fought 2012 race. His performance five years later, this time faced with accusations that he molested a 14-year-old girl, sexually assaulted a 16-year-old girl and pursued numerous other teenagers, was notably depressed. Moore’s base -- rural white evangelicals in Alabama’s northern counties -- simply didn’t show up in large enough margins. It probably didn't help that Shelby, the state’s senior senator, who is a staunch Republican conservative, went on CNN on Sunday and advised against voting for his own party's candidate.

Advertisement:

Conversely, the black share of the Alabama vote was way up compared to past elections — heavily favoring Jones, a former U.S. attorney who is well known and widely admired in the black community.

Black voters generally comprise around one-fourth of Alabama’s electorate. On Tuesday their proportion was close to 30 percent. Black turnout is normally depressed by the lack of statewide competition, but this time they were courted by prominent African-American figures in get-out-the-vote operations leading up to Tuesday’s election. Former President Barack Obama recorded a robocall for Jones, and both New Jersey Sen. Cory Booker and former Massachusetts Gov. Deval Patrick traveled to Alabama to campaign on behalf of the Democrat.

The outcome of the race, of course, has national implications that could set the tone for the 2018 midterm elections. Jones’ victory diminishes Republicans’ Senate majority to 51 seats, and serves as a potentially devastating blow to Trump’s legislative agenda.

Advertisement:

While Jones’ campaign stressed a platform of job creation and health care, the race was dominated by Moore’s antics and the Republican civil war that his candidacy symbolized.

Senate Majority Leader Mitch McConnell may have avoided an awkward discussion about what to do with Roy Moore in the Senate, but he will likely be blamed for the embarrassing loss, at least by Trump-supporting conservatives. Steve Bannon, Trump's former White House chief strategist and the chairman of Breitbart News, is already attempting to deflect attention from his failed role by blaming McConnell’s insufficient support for Moore's defeat. McConnell is fighting back.

Advertisement:

“Not only did Steve Bannon cost us a critical Senate seat in one of the most Republican states in the country, but he also dragged the President of the United States into his fiasco,” said Steven Law, president of the McConnell-aligned Senate Leadership Fund.

When the accusations against Moore first came to light many Republicans called on him to step aside from the campaign, “if the allegations were true.” As Moore resisted, they wilted and walked back their criticism. President Trump, who originally endorsed appointed incumbent Luther Strange in the GOP primary, enthusiastically urged Alabamians to vote for Moore. They have now chosen a Democrat instead.

If the intraparty bickering gets any uglier, McConnell’s plans to pass the GOP tax bill before Doug Jones can be seated in the Senate next year may be in doubt.

Advertisement:

After Alabama votes, what's next? Tune in to "Salon Talks" Wednesday at 12 p.m. ET and 9 a.m. PT to watch Salon's Amanda Marcotte, Alyona Minkovski and Jeremy Binckes break down what the results of Tuesday's extraordinary Senate election in Alabama mean now and looking ahead to 2018. Watch "Salon Talks" on Facebook, Periscope and Salon.