The candidate in the driver’s seat to become Alabama’s next senator is an uncompromising evangelical conservative twice removed from the state’s Supreme Court for putting his faith above the law.

Roy Moore, the Republican who knocked out the incumbent, Luther Strange, in Tuesday’s runoff election, has been a well-known figure among the GOP’s most conservative members for his staunch defense of religious liberties and outspoken opposition to gay marriage and abortion. And he proved to be the candidate most capable of tapping into the populist wave that swept Donald Trump into office, even without the president’s backing.

Assuming Moore can best the Democrat Doug Jones in the Dec. 12 general election, Alabama is now poised to send another conservative firebrand to Washington who, like Trump, promises to shake up an establishment that fought hard to stop him.

Moore, 70, is not a newcomer to the political scene — he served twice as a chief justice of the state Supreme Court and has unsuccessfully run for governor twice. But throughout his Senate bid, Moore was able to paint himself as the outsider challenging Strange, then-Gov. Robert Bentley’s hand-picked appointee to fill Jeff Sessions vacated seat.

And though Trump and Vice President Mike Pence campaigned for Strange, Moore enjoyed strong support from some of the president's best-known allies like former White House aides Steve Bannon and Sebastian Gorka, and Secretary of Housing and Urban Development Ben Carson. Moore will be a heavy favorite to win in a deep-red state that has not elected a Democrat to statewide office since 2008.

Related: Moore Trounces Trump-Backed Candidate in Alabama Senate Race

Like Trump, Moore has a history of making controversial statements. As a judge, Moore wrote in a 2002 opinion that homosexuality is "an inherent evil," and warned at a 2012 tea party rally that same-sex marriage would be “the ultimate destruction of our country.” He’s said everything from 9/11 to school shootings to high murder rates are examples of God punishing America, writing in one poem that “when abortion is no longer called murder, when sodomy is deemed a right, then good is now called evil and darkness is now called light.” He has said that he has a "personal belief" that former President Barack Obama was not born in the United States, aligning himself with the conspiracy theory Trump pushed for years as a private citizen.

Moore has made clear, however, that his defense of religious liberties does not extend to Islam. This year he called it a “false religion” and in 2006 wrote that Rep. Keith Ellison, D-Minn., who is Muslim, should not be seated in Congress for having been sworn in on the Quran.

“Common sense alone dictates that in the midst of a war with Islamic terrorists we should not place someone in a position of great power who shares their doctrine,” Moore wrote. “In 1943, we would never have allowed a member of Congress to take their oath on 'Mein Kampf,' or someone in the 1950s to swear allegiance to the 'Communist Manifesto.'"

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

None of Moore's past comments, many of which were dredged up during the runoff campaign, threatened to derail his bid to replace Strange. But they could make the general election more competitive than it might otherwise be and cause a lingering headache for other Republicans, who will likely have to answer for their potential colleague.

It’s why Strange warned in a recent interview that Moore would be "an anchor around the neck of the party for the next couple years,” comparing him to Todd Akin, the failed 2012 GOP Senate nominee from Missouri whose "legitimate rape" remark derailed his campaign.

"We have blacks and whites fighting, reds and yellows fighting, Democrats and Republicans fighting, men and women fighting," Moore said in a campaign speech this month. “Red” has historically been viewed as a racial slur against Native Americans, while “yellow” has been used as a derogatory term for Asians. The candidate apologetically defended his remarks by quoting a Bible school song that uses the phrase.

And he used the opening remarks of the first and only debate of the runoff race to declare that “crime, corruption, immorality, abortion, sodomy, sexual perversion sweep our land." He vowed to fight “political correctness and social experimentation like transgender troops in our bathrooms and inclusiveness.”

Brent Buchanan, a Republican strategist in Montgomery, Ala., said: "There are a lot of Republicans that have not historically been Roy Moore supporters, but they now are because they see him in the same way they see Donald Trump. They may not agree with him on everything, but he’s bold and he’s brash and they see him as his own man.”

Former Alabama Chief Justice and U.S. Senate candidate Roy Moore rides in on a horse to vote at the Gallant Volunteer Fire Department during the Alabama Senate race, Tuesday, Sept. 26, 2017, in Gallant, Alabama. Brynn Anderson / AP

And his controversial words and actions long predate his senatorial run.

One of Moore’s professors at law school said he had to give up on any kind of Socratic discussion in his class because of Moore’s obstinacy. “If Moore's analysis of a case was tantamount to thinking 1 + 1 = 3, and his classmates reasoned otherwise, there was no backing down by Moore,” Guy V. Martin, Jr., a Christian conservative himself, wrote in an op-ed for AL.com. “Moore never won one argument, and the debates got ugly and personal.”

Related: Alabama GOP Senate Candidate Uses Racial Slurs in Speech

His fighting spirit began well before he entered law school at the University of Alabama. After graduating from West Point in 1969, he served as a military police officer in Vietnam. His insistence on strict discipline earned him the derisive nickname “Captain America,” and he took to sleeping surrounded by sandbags for fear a fellow soldier might try to kill him.

“I did not consort with the troops," he wrote in his memoir, adding that he had a boxing ring constructed so the men could relieve their frustration with his command. “I took on all challengers. I won all of my fights.”

Later, after losing an election in Alabama, he spent nine months training in martial arts so he could return to the state and achieve some vindication by defeating a second-degree black belt in a tournament. “It was a symbolic victory and one I needed,” he wrote.

And the battles only grew as Moore’s legal career progressed. He was nearly driven out the state under pressure from two bar complaints, both of which proved to be unfounded. But controversy ultimately saved him by lionizing the jurist as a hero for evangelicals everywhere.

Moore first gained national notoriety among conservatives when he installed a 5,280-pound sculpture of the Ten Commandments in the rotunda of the Alabama Supreme Court in 2001. His refusal to remove the two-and-a-half ton stone led to his ouster as chief justice but spurred a national tour by both Moore and the monument.

The newfound attention from the right-wing, however, did not immediately translate to electoral victories in his home state. He unsuccessfully ran for governor in 2006 and 2010, failing both times to mount a serious challenge to his more mainstream GOP primary opponents. But Moore had a comeback of sorts in 2012 when he again was elected as chief justice of the Alabama Supreme Court.

Again, however, Moore did not finish out his term. He directed state judges in 2016 not to issue marriage licenses to same-sex couples, leading to his suspension and ultimate retirement earlier this year.

That spurred Moore’s retirement from the bench and announcement he would run for Senate. Moore won a commanding 39 percent of the vote in the crowded Republican primary field last month. He went on to defeat Strange by a margin of 10 percent in Tuesday’s runoff election.

Perhaps fittingly, Moore had a framed copy of the Ten Commandments at his victory party Tuesday night.

"I believe we can make America great, but we must make America good and you cannot make America good without acknowledging the sovereign source of that goodness, the sovereign source of our law, liberty and government, which is almighty God," Moore said.