MONTGOMERY, Ala. — Women drew the line at Roy Moore.

There are many reasons why Moore became the first Republican nominee to lose an Alabama Senate race since 1992 on Tuesday night, including a strong turnout by African-American voters and a lack of enthusiasm among Moore's base.

But with Moore denying multiple allegations of inappropriate behavior with teenage girls, and attacking his accusers against the backdrop of a national reckoning on sexual misconduct, the most striking aspect of the vote may have been the unmistakable message sent by the women of Alabama about how much was too much.

Fifty-eight percent of Alabama women voted for the winner, Democrat Doug Jones, including 35 percent of white women, according to exit polling. While that latter figure might not sound like much, it’s more than twice the 16 percent of white Alabama women who voted for President Barack Obama in 2012, the last presidential race in which exit polling was conducted.

Outside a Montgomery polling place on Tuesday afternoon, Sandra Davis, a self-described independent, said she was tired of her state being the “laughingstock of the nation.”

“One reason,” she said, when asked why she voted for Jones: He’s “not Roy Moore.”

Related: Doug Jones is projected winner in Alabama Senate race

To get to the point where women could put him over the top in one of the most conservative states in the country, Jones needed everything to go right. Just 13 months ago, Donald Trump took 62 percent of the vote in Alabama.

But every factor lined up in Jones' favor. Moore was a uniquely flawed candidate. Many national Republican leaders — including Alabama Sen. Richard Shelby — abandoned him after the allegations of sexual misconduct arose. Democrats, as they have been in elections across the country since last November, were energized by the chance to strike a blow against President Trump and his agenda.

A twice-deposed former chief justice of the Alabama Supreme Court, Moore defeated establishment favorite Sen. Luther Strange in a September primary run-off that badly divided the Republican Party both in this state and at the national level.

He became the latest focal point in a long-running war between Senate Majority Leader Mitch McConnell and former White House strategist Steve Bannon, who has made a mission out of toppling sitting senators in primaries and trying to oust McConnell from his job. But Bannon hadn't counted on a group of women stepping forward to accuse Moore of sexually abusing them when they were teenagers, and he hadn't counted on the effect those accusations would have on the women who went to the polls on Tuesday.

Supporters of Democratic U.S. Senate candidate Doug Jones celebrate as Jones is declared the projected winner during his election night party Tuesday in Birmingham, Alabama. Justin Sullivan / Getty Images

In that way, the result held silver linings for establishment Republicans in Washington. They had warned that Moore, who had long since alienated many moderate GOP voters in the state with his firebrand politics, would leave the seat vulnerable to Democratic takeover.

“Steve Bannon managed to do the impossible, and he should’ve forever secured a place in the Democratic consultant hall of fame,” Josh Holmes, a former McConnell chief of staff and campaign manager, said in an email exchange with NBC News. “It was thought to be damn near impossible for a Republican to lose the state of Alabama, but Steve Bannon hadn’t run a race there.”

Tick-tock: A historic election as it unfolded

Bannon didn’t have an official role with Moore’s campaign, but he was the most forceful advocate for the Republican nominee in national politics, and he headlined two rallies for Moore in the last week. On Friday, Trump, Bannon's old boss, visited Pensacola, Florida, about 15 miles from the Alabama border, and issued a full-throated endorsement of Moore that carried across the state line on cable television. His voice was also ignored by most of the state's women.

In fact, among both men and women, only 49 percent of voters on Tuesday said they approve of the way Trump is handling his job, according to exit polling. And 52 percent said he wasn’t a factor in their decision in the Senate race.

Jones’ coalition was built on women, African-Americans, college graduates and younger voters — many of them in and around the metropolitan centers of Huntsville, Birmingham, Montgomery and Mobile. Black voters accounted for 28 percent of the electorate, a slightly higher figure than their share of the population.

Moore won men, whites, less-educated voters and older voters. But he had trouble turning them out in the numbers he needed to win.

Black women were the most consistent supporters of Jones. And while two-thirds of white women went for Moore, Jones won a much larger share of them than Democratic candidates typically do in Alabama. In the 2012 presidential election, 5 percent of the electorate was made up of white women who voted for Obama. On Tuesday, white women who voted for Jones accounted for more than 10 percent of all voters. In other words, had white women in Alabama voted as they normally do in federal elections, Jones would have lost.

Zac McCrary, an Alabama-based Democratic pollster, credited Jones with doing the leg work to make sure he took advantage of an energy among Democrats that has been evident in special elections across the country since Trump won the presidency.

“The Jones' campaign built a real infrastructure and funded it,” McCrary said. “So they poured gasoline on the fire that was already going.”

But white women who typically support Republican candidates were a key factor in the outcome. Some crossed party lines to vote for Jones and many others simply declined to go to the polls.

That’s a message that will resonate all the way into the midterm elections of 2018, and beyond.