The results were unexpected, despite the allegations against Moore, because Alabama is such a GOP-dominated state.

Doug Jones' win on Tuesday night is historic — he will be the first Democrat to represent Alabama in the Senate in more than two decades.

In a closely watched special election for an Alabama Senate seat, Democrat Doug Jones defeated Republican Roy Moore, who refused to step out of the race amid allegations of past sexual misconduct against teen girls.

In a closely watched special election for an Alabama Senate seat, Democrat Doug Jones defeated Republican Roy Moore, who refused to step out of the race amid allegations of past sexual misconduct against teen girls.

While it's too early to know the breakdown of the voting demographics in the race, many people on social media credited the win to black voters, especially black women.

My god. Ninety-eight percent of black women went for Jones, per exit poll. https://t.co/OVwSjKnsUW

Black residents make up 26.8% of Alabama's population, according to US Census data, and often vote for Democrats. And voter turnout during Tuesday's election was high.

"Trust black women, trust a real investment of resources, and trust excellent organizing," Symone Sanders, Priorities USA strategist, told BuzzFeed News.

The night before the election, Kayla Moore, Roy Moore's wife, had defended her husband against people who said he was racist.

"We have many friends that are black, and we also fellowship with them in church and in our home," she said at a campaign rally.

For his own part, Jones has pointed many times to his record of helping black residents, often pointing to when he was a federal prosecutor in the infamous 1963 bombing of the predominantly black 16th Street Baptist Church in Birmingham, pursuing a case against two members of the Ku Klux Klan.