It was once called a long shot, but Democrat Doug Jones defeated his Republican opponent Roy Moore Tuesday to become the first Democratic senator to represent Alabama in two decades.

It was a long election battle in not just the Yellowhammer State, but also for the nation, as many women came out to accuse Moore of being guilty of sexual harassment and assault while he was in his 30s and they were in their teens.

For Republicans, it divided the GOP, as many supported Moore, who says he is innocent of the accusations, and others who wanted him to step out of the race.

However, the controversy most likely helped Moore's opponent gain a victory that Democrats have not been able to obtain in 20 years.

"We have shown, not just around the state of Alabama, but we have shown the country the way. That we could be unified," declared Jones.

It is a stunning upset in a race the nation has been following for months and in the end Jones won over Moore in the Alabama Special Election for a key U.S. Senate seat.

During those months, Moore was hounded by multiple allegations that he was guilty of sexual misconduct with teens, one only 14, when he was in his 30s.

Moore did address his supporters late Tuesday night, but he has not officially conceded. Instead, he hinted at a recount.

"Realize when the vote is this close that it's not over. And we still got to go by the rules about this recount provision," he said.

However, the Alabama Secretary of State John Merrill talked about the clarity of the process and assured voters, noting it was "highly unlikely" Jones would not be certified as the winner of the race.

There have been more than three million tweets sent about Alabama and even President Donald Trump shared his congratulations in a tweet.

However, on Wednesday morning, Trump tweeted that things were stacked against Moore. 

Other prominent Republicans, too, chimed in, including outspoken Republican Sen. Jeff Flake, as well as the Governor of Ohio, John Kasich.

By 10:30 last night, Jones was already tweeting as well.

And then, he gave his victory speech.

"We have been in a crossroads in the past, and unfortunately we have usually taken the wrong fork. Tonight, ladies and gentlemen, you took the right road!" Jones announced

The victory by Jones, a former U.S. attorney best known for prosecuting two Ku Klux Klansmen responsible for Birmingham’s infamous 1963 church bombing, narrows the GOP advantage in the U.S. Senate to 51-49.

That imperils already-uncertain Republican tax, budget and health proposals and injects tremendous energy into the Democratic Party’s early push to reclaim House and Senate majorities in 2018.

The Associated Press contributed to this story.