Roy Moore, the 70-year-old GOP nominee who was twice ousted as state Supreme Court chief justice after flouting federal law, was attempting another political resurrection amid accusations of sexual misconduct with teenage girls when he was in his 30s.
Democrat Doug Jones, 63, is best known for prosecuting two Ku Klux Klansmen who killed four black girls in a 1963 church bombing.
The winner will take the seat previously held by Jeff Sessions, who resigned to become attorney general.
Republicans hold a narrow 52-48 Senate majority. And a routine election in Republican-dominated Alabama would not normally be expected to alter that balance because the state has not sent a Democrat to the upper chamber of Congress since 1992. But the allegations against Moore created doubt about the outcome.
Although the race has commanded intense national attention for weeks, it was not likely to draw large numbers of people to the polls. Alabama Secretary of State John Merrill predicted that turnout would not exceed 25 percent of registered voters and could be as low as 18 percent.
Teresa Brown, a 53-year-old administrative assistant at the University of Alabama at Birmingham, said she's voting for Jones.
"We don't need a pedophile in there," said Brown, who was among more than two dozen people in line in the chilly morning air at Legion Field, a predominantly black precinct in Birmingham.
"We need someone that's going to represent the state of Alabama, work across party lines ... just be there for all the people, not just a select few of the people."
Al Bright, 63, who does refrigeration repair, voted for Moore.
"I just believe regardless of the allegations against him, I believe he is an honorable man," Bright said.
Bright said he realized that Moore was removed from office because of actions he took to try to block same-sex marriage in the state.
"I don't think there's anything wrong with that because I believe in that as well," he said. "I feel the same - marriage is between a man and a woman."
Mary Multrie, 69, who works at a children's hospital and voted for Jones, said she was not influenced by accusations of sexual misconduct against Moore because she already did not like him.
"He's not a truthful man," Multrie said. "He talks about God, but you don't see God in his actions."
Both President Donald Trump and former President Barack Obama weighed in with last-minute robocalls trying to sway voters.
The intensity of the campaign also spawned a steady stream of fake news stories that filled social media feeds in Alabama and beyond.
An Associated Press analysis, in cooperation with Facebook, counted as many as 200 false or misleading reports heading into the weekend. One website claimed one of the women who accused Moore of sexual misconduct had recanted. She did not. Meanwhile, Moore's detractors took to social media to claim he had written in a 2011 textbook that women should not hold elected office. He did not.
In his final pitch before polls opened across the state, Jones called the choice a "crossroads" and asked that "decency" prevail.
"We've had this history in the past, going down the road that ... has not been productive," Jones said. "We've lagged behind in industry. We've lagged behind in education. We've lagged behind in health care. It's time we take the road that's going to get us on the path to progress."
At his own election eve rally, Moore again denied the allegations against him, calling them "disgusting" and offering voters a clear measure: "If you don't believe in my character, don't vote for me."
For Alabama, the outcome could be defining.
Democrats and moderate Republicans see an opportunity to reject a politician who is already regular fodder for late-night television.
Alabama's senior senator, Richard Shelby, confirmed publicly that he wrote in a "distinguished Alabama Republican" rather than vote for Moore.
Many other Republicans see an opportunity to defend the state's conservative, evangelical bent in the face of liberal criticism while delivering another victory for Trump and sending an anti-establishment senator into a federal government that has been reflexively unpopular among Alabama majorities for generations.
As ballots were cast, Moore's wife drew ridicule online for her attempt to defend her husband against allegations that he does not care for blacks or Jews.
"Well, one of our attorneys is a Jew," Kayla Moore said Monday evening at a campaign rally. She paused for effect and nodded before adding, "We have very close friends who are Jewish and rabbis, and we also fellowship with them."
Some critics expressed anger but many others made jokes, mocking her for citing an association with a paid professional as a way to prove they do not dislike Jewish people.
For Jones to win, he must build an atypical coalition, maximizing turnout among African-Americans and white liberals while coaxing votes from white Republicans who cannot pull the lever for Moore.
One of Jones' celebrity backers framed the choice as being much less complicated.
"I love Alabama," said former NBA basketball star Charles Barkley, a Leeds native who has talked in past years about running for governor. "But at some point we've got to draw a line in the sand and say, 'We're not a bunch of damn idiots.'"
Chandler reported from Midland City. Associated Press Writer Emily Wagster Pettus contributed from Birmingham.
Send a breaking news alert
Report a correction or typo
Learn more about the 6abc apps