MONTGOMERY, Alabama — Democrat Doug Jones assembled an unusual Deep South alliance to claim a Senate seat Tuesday in Republican-dominated Alabama, combining strong turnout among African-Americans and white liberals with enough crossover support from conservatives who couldn't stomach scandal-ridden Republican nominee Roy Moore.

Among those disaffected GOP voters was the state's most powerful Republican, Sen. Richard Shelby, who very well may have handed Jones his victory margin of about 1.5 percentage points.

The six-term senator made a late campaign show of declaring he couldn't vote for Moore, an evangelical populist, after allegations from multiple women who said the 70-year-old molested and sexually pursued them decades ago, when they were in their teens and Moore was in his 30s.

Shelby, who was the last Democrat to win a Senate seat from Alabama in 1992 before switching parties two years later, declared the charges credible, despite Moore's denials, and the senior senator said he'd write in another Republican. Incomplete returns showed that about 1.7 percent of the more than 1.3 million Alabama voters did the same thing, almost certainly denying Moore votes that would have gone to any other Republican.

The result, driven also by surprisingly high turnout for a holiday season special election, upended the partisan splits in a state President Donald Trump won by 28 percentage points just 13 months ago. Republicans hold every other statewide office and six of seven U.S. House seats and they dominate the state Legislature.

A 63-year-old former U.S. attorney, Jones will take the seat held previously by Attorney General Jeff Sessions.

Jones closed Democrats' usual gap by posting wide margins in the state's four most populous counties that fall along the Interstate 65 corridor, from Mobile County on the Gulf Coast to the NASA hub of Madison County near the Tennessee border. He also dominated the counties of the Black Belt, named for the color of its soil, and added wins in the counties of the state's two largest college campuses, the University of Alabama and Auburn University. Jones also narrowed the Republican advantages in several other counties across the state, though Moore dominated in many small towns and rural areas where his evangelical appeal is strongest.

The pattern copied the second of Moore's statewide victories for Alabama chief justice — but in that 2012 race, the Republican managed to survive with a 4-point victory. This time, voter turnout tended to be higher in Jones' strongholds than in Moore's.

Jefferson County, where Jones resides in a Birmingham suburb, highlights the Democrat's success in putting together disparate groups of Alabamians — black voters in the city and western suburbs, white Republicans from the southern suburbs. Jones won 68 percent to 30 percent in Jefferson, good for a 71,000-vote advantage, about 10 times his statewide margin. By comparison, Moore's Democratic opponent in 2012 managed 63 percent in that county.

To win black voters, Jones touted his biography as the prosecutor who won convictions of two Ku Klux Klansmen who killed four black girls in the 1963 bombing of Birmingham's 16th Street Baptist Church. To reach conservatives and moderate Republicans, Jones focused on Moore's baggage and featured Shelby's statements about his vote in television ads that ran in the campaign's closing days.

Ultimately the race was about Moore, from the allegations of misconduct to his controversial stints as Alabama Supreme Court chief justice, where both terms ended in his removal for defying federal law, including his refusal to acknowledge the U.S. Supreme Court's decision legalizing same-sex marriage.

"I never thought ... Alabama would be so low, as it is at this point," said Rosa Thompson, a 78-year-old retired nurse from Demopolis, a Black Belt town. "We need Christians with true Christian values. Not just talk the word. We need them to live it. I think God will be pleased if we go out and vote for Doug Jones."

Moore certainly maintained his base despite the charges.

"The one that seems to be closest to God is the one I'm going to vote for," said Margie McMinn, 65, of Clanton, a retired textile worker.

In Midland City, where Moore closed his campaign Monday night with a large rally, Pam McLain, 63, said she accepted Moore's denials of sexual misconduct. "I just don't believe it. I know it happens because it happened to me I have been sexually harassed on two different jobs but I don't believe this. I think it's been too long and I just don't believe it," McLain said.

Moore won McMinn's Chilton County with 75 percent of the vote and McLain's Dale County with 63 percent of the vote. But both gave him much smaller raw-vote victories, a trend that carried across the state's less populous counties.

AP Polling Director Emily Swanson and writers Kim Chandler and Emily Wagster Pettus contributed to this report.