Before Roy Moore’s sexual assault allegations came to light, the Republican senate candidate was already a polarizing figure.

Moore has argued that Muslims shouldn’t be able to serve in Congress; he promoted the conspiracy theory that former President Barack Obama wasn’t born in the U.S.; and he said in a 2005 interview that “homosexual conduct” should be illegal.

Then, slightly a month before the special election, the Washington Post released a bombshell report of allegations that Moore had inappropriate sexual conduct with teenage girls while he was in his 30s. One woman alleged that Moore had her touch him in private areas when she was just 14.

After the initial report, additional women came forward with allegations of sexual misconduct.

Moore staunchly denied the accusations, but even still, many leading Republicans called on him to step aside from the campaign. However, others – including President Trump and Steve Bannon – stood by Moore.

The former judge lost the Alabama Senate election earlier this month to Democrat Doug Jones, but he thus far has refused to concede.

After a judge rejected a last-minute complaint from Moore that alleged “voter fraud” had given Jones his victory, the Democrat was officially certified as the winner of the state’s Senate race on Dec. 28.

Read on for a look at the special Senate election held earlier in December to replace Jeff Sessions.

Doug Jones, Democrat

A former U.S. attorney during the Clinton administration, Jones beat out seven other Democrats to secure the party’s nomination. And he eventually became the first Democrat elected to the U.S. Senate in Alabama since 1992.

Jones, 63, is perhaps best known for successfully prosecuting two members of the Ku Klux Klan accused of bombing a Birmingham church in 1963 that killed four young girls.

“I may have the honor of serving Alabama as your senator, but the most important thing I have done is prosecuting those klansmen who killed 4 little girls at 16th St Baptist Church,” Jones said in a November tweet.

Because of his resume, Steven Taylor, a political science professor at Alabama’s Troy University, said Jones is considered to be a “quality candidate” in the political science world. He's “someone who is credible and, therefore, competitive,” Taylor told Fox News.

HERE ARE ALL OF THE REPUBLICANS WHO HAVE COME OUT AGAINST ROY MOORE

“We’ve not seen a lot of quality Democratic candidates for Senate because Sen. [Richard] Shelby and Sen. Sessions, they were so strongly ensconced in their positions that the Democratic nominee was most often a more fringe candidate and not taken very seriously,” Taylor said. “Jones doesn’t fall in that category – he has a background as a prosecutor, he has linkage to Civil Rights prosecution for the bombers in Birmingham. This makes him a more serious and significant candidate.”

Openly critical of Trump, Jones promised to fight for pro-abortion policies, tackling student loan debt and raising the minimum wage.

Even prior to the allegations of Moore groping a teenage girl, Democrats reportedly felt optimistic about Jones’ chances of winning in a historically red state. And after the allegations, some polls – such as a Fox News poll conducted days before the election – had Jones in the lead.

While Jones initially stayed away from the accusations against Moore, the Democratic candidate came out swinging during a speech the week before the election.

“I damn sure believe that I have done my part to ensure that men who hurt little girls should go to jail and not the United States Senate,” Jones said.

Jones was endorsed by prominent Democrats, including former Vice President Joe Biden and Rep. John Lewis, D-Ga. In addition, Sen. Cory Booker, D-N.J., campaigned for Jones, as did former Massachusetts Gov. Deval Patrick.

Jones also received a surprising financial backing from a Senate Republican – Jeff Flake. The Arizona senator tweeted a photo of a check made out to Jones with the subject line saying, “Country over Party.”

And Trump, although he endorsed Moore, tweeted his congratulations to Jones.

“Congratulations to Doug Jones on a hard fought victory. The write-in votes played a very big factor, but a win is a win,” Trump said. “The people of Alabama are great, and the Republicans will have another shot at this seat in a very short period of time. It never ends!”

Prior to the election, Alabama House Minority Leader Anthony Daniels, D, encouraged Jones to “stay the course” and not get bogged down with the allegations against Moore.

“Getting involved in the allegations, that doesn’t bring jobs to Alabama. That doesn’t bring opportunity or economic prosperity to our state. That doesn’t help education or health care. It doesn’t help our infrastructure,” Daniels told Fox News. “Why would he focus on that?”

Daniels also praised Jones for being “a fighter for his entire career.” He said Jones would bring “unity and civility” to the Senate and would work with lawmakers across the aisle to better Alabama.

Roy Moore, Republican

Called the “Ayatollah of Alabama” by critics who believe he too closely marries his political and judicial responsibilities with his religious beliefs, Judge Roy Moore emerged as the leader of the Republicans vying for the open Senate seat. In a special primary election earlier this year, Moore defeated incumbent Sen. Luther Strange who was tapped to fill the position when then-Sen. Jeff Sessions became the U.S. attorney general.

In the primary, Moore, 70, garnered the support of conservative darlings, such as former Alaska Gov. Sarah Palin and “Duck Dynasty” star Phil Robertson. Trump initially backed Strange but would eventually throw his weight behind Moore. Trump’s former adviser, Steve Bannon, also campaigned for Moore.

Moore’s political past is mired in controversy, which he used to his advantage during the primary election. He was twice removed from Alabama’s Supreme Court. The first time, he was dismissed when he refused to move a boulder-sized Ten Commandments monument from the statehouse; he was permanently suspended in 2016 after he instructed probate judges to deny marriage licenses to same-sex couples.

The Supreme Court incidents worked in his favor given that Alabamians are generally very conservative and religious, Taylor said. And his refusal to bend to the federal government is in line with a “tradition” set in the state by the former longtime pro-segregationist Gov. George Wallace, he said.

“He’s very outspoken in a variety of ways,” Taylor said of Moore. “He’s a little more reflective of those more populist candidates we’ve seen of late, including the president.”

Prior to the election, Taylor thought it possible that voters in the deep red state of Alabama could look the other way.

“In some ways, that Roy Moore has a very strong religious element to his politics is not substantially out of the mainstream for the state,” Taylor said.

"He's very outspoken in a variety of ways." — Dr. Steven Taylor, Troy University political science professor

After Moore’s primary victory, Trump called him a “really great guy who ran a fantastic race.” Many Trump supporters turned out to campaign for Moore during the primary, despite the president’s backing of a different candidate.

Moore’s judicial past took a backseat, however, when the Washington Post reported that four women accused Moore of engaging in inappropriate sexual behavior with them while they were teenagers and he was in his 30s.

Leigh Corfman, now 58, alleged that Moore first approached her in a courtroom in 1979 when she was 14 years old. Eventually, Moore took her to his house, took off her shirt and pants, touched her private parts and guided her hand to his underwear, she said. The two did not have sexual intercourse, and he took her home when she asked, Corfman said.

After the Washington Post's initial report, several more women accused Moore of being sexually inappropriate.

Moore vehemently denied the accusations, calling them “baseless” and “the very definition of fake news.”

“It seems that in the political arena, to say that something is not true is simply not good enough. So let me be clear. I have never provided alcohol to minors, and I have never engaged in sexual misconduct,” Moore said in a statement provided to Fox News.

He also told Fox News’ Sean Hannity that he “generally” didn’t date women who were teenagers when he was in his 30s and would not date someone without her mother’s permission. Moore admitted it’s possible that he did go on dates with one of the accusers in the Washington Post report who said she was 17 when Moore kissed her.

That line of defense was not “as strident or strong as one might expect,” Taylor said.

Despite numerous Republican leaders backing away from Moore, Trump tweeted on Dec. 12 – Election Day – that Moore “will always vote for us.”

“The people of Alabama will do the right thing,” Trump tweeted while encouraging his followers to vote for Moore.

But following Moore’s loss, the president noted that he originally endorsed Strange because he knew that Moore “will not be able to win the General Election.”

“I was right! Roy worked hard but the deck was stacked against him,” Trump said.

And on Dec. 23, Trump again said on Twitter that he “said [Moore] would lose in Alabama” and touted his initial support of Strange.

A week before the election, the Republican National Committee began to support Moore again, just three weeks after it pulled its financial support for the beleaguered candidate.

But despite his loss, Moore didn’t give up. He filed an election complaint on Dec. 27, that said alleged “voter fraud” was so prevalent, it “improperly altered the outcome of this election.” The complaint calls for a “thorough investigation” and is meant to block the certification of Jones until a probe is completed, Moore’s campaign said.

A judge rejected Moore’s attempt to challenge the election.

According to the election results from earlier in December, Moore lost to Jones by a margin of 21,000 votes.

If Moore had won, Senate Majority Leader Mitch McConnell, R-Ky., said he would “immediately have an issue with the Ethics Committee.”

Fox News’ Lukas Mikelionis and the Associated Press contributed to this report.