Joe Raedle / Getty Images

Republicans should have had an easy time winning an Alabama Senate seat — but they really could lose Tuesday as the state’s wild, extraordinary race comes to an end. Voters will decide between GOP nominee Roy Moore, a right-wing culture warrior and the state’s former chief justice, and Democrat Doug Jones, a former US attorney known for successfully prosecuting two members of the Ku Klux Klan for a bombing that killed four black children. The winner gets the seat previously held by Jeff Sessions, who joined the Trump administration as attorney general this year. In the closing weeks, the race has been rocked by allegations that Moore, as an adult, made sexual advances on a minor, sexually assaulted a 16-year-old, and pursued romantic relationships with other teens. Moore has denied the allegations. But the scandal alarmed many national Republicans: Senate Majority Leader Mitch McConnell and the National Republican Senatorial Committee disavowed him and have raised the possibility of expulsion should Moore win. And national Democrats, who were already intrigued by their chances against a wild card such as Moore, have sensed an opportunity to pick up a seat in the kind of Deep South state they generally write off and narrow the GOP’s 52-seat edge in the Senate.

Bill Clark / CQ-Roll Call,Inc. Jones

“I didn't vote for Roy Moore,” Sen. Richard Shelby, the Alabama Republican who will serve alongside the winner, said Sunday morning during an interview with CNN’s Jake Tapper. “I wouldn't vote for Roy Moore. I think the Republican Party can do better.” Even without the misconduct accusations, the Senate race would have been a national spectacle because of the perpetually controversial Moore. He was twice removed from the Alabama Supreme Court, first over his refusal to remove a Ten Commandments monument on public grounds, and again when he refused to enforce federal rulings on marriage equality. He also is known for his far-right positions on gay rights (he once said homosexuality should be illegal) and for his opinion that Muslims should not be allowed to serve in Congress. But even after the allegations, Republicans did not totally abandon Moore. President Donald Trump, whose victory last year despite late-breaking accusations of sexual misconduct has served somewhat as a template for Moore, offered unequivocal endorsements for the candidate over the last week. Trump also used a political rally Friday in Pensacola, Florida — a media market that reaches Alabama voters — to plug Moore’s candidacy. The Republican National Committee, which had briefly withdrawn its financial support, followed Trump’s lead and resumed its assistance in the last week of the race. Jones has enjoyed a significant money advantage, thanks to his own fundraising efforts and to expenditures by allied groups. But in a state where Trump won 63% of the vote in 2016, piecing together a winning coalition for a Democrat is still a tricky affair. Jones needs Democrats to turn out in droves, and he also needs to win some Republican voters disenchanted with Moore and hope that some Republicans just stay home.

Justin Sullivan / Getty Images

The Democratic cavalry arrived in the campaign’s final weekend to help Jones with the first part: Jones spent the weekend campaigning in Democratic areas up and down the state with prominent black Democrats, including New Jersey Sen. Cory Booker, former Massachusetts Gov. Deval Patrick, and Rep. Terri Sewell, Alabama’s lone Democratic member of Congress. Former president Barack Obama and former vice president Joe Biden recorded robocalls for the Democrat that began running Monday, the AP reported. At each of his stops over the weekend, Jones made a point of quoting Shelby’s attacks on Moore. Moore, meanwhile, disappeared from the campaign trail over the weekend, and his team was sketchy about reports that he was in Philadelphia for the Army–Navy football game. Wherever he was, he held no public events until Monday night and skipped his hometown church service. (On Monday night, Moore confirmed he was out of the state over the weekend, “to take my wife out of the mess and let her relax with her son at West Point.”)

Joe Raedle / Getty Images Moore