MONTGOMERY, Alabama — Stationed outside the entrance to Judge Roy Moore’s victory party Tuesday night stood two tablets embossed with the Ten Commandments, mounted on an easel and draped in white cloth.

Christian choir music played inside. A video came on in which Moore declared, “God is raising up generals all over this great nation.” When the early voting returns began rolling in, Moore came out and told the crowd he had run the best campaign of his career — before catching himself in the boast.

"But remember," he quickly added, "all glory goes to God.”

On Tuesday night, Moore proved the clear winner in a divisive and fantastically expensive Alabama Republican primary to fill the Senate seat vacated by Attorney General Jeff Sessions.

Moore coasted to a first-place finish in a 10-person field, beating out two candidates — incumbent Sen. Luther Strange and Tea Party favorite Rep. Mo Brooks — with much more money and institutional support. Moore and Strange will now compete in a runoff to conclude the GOP primary on September 26; the general election will follow in December. Moore is in the driver’s seat.

It’s a remarkable rise for someone once consigned to the far-right fringes of politics, even in Alabama. Over three decades in public life, Moore has defied federal court orders, addressed a white supremacist group, penned invectives against Perez Hilton over same-sex marriage, and argued that Rep. Keith Ellison (D-MN) should not be seated as a Congress member because he is Muslim.

All of those actions flowed from a conviction about religion’s role in policy that, by his own accounting, puts Moore far afield from almost all elected Republicans. His ambition isn’t merely for the government to carve out a space for free religious exercise, as many conservatives demand; instead, he argues that Christian principles — or, more accurately, Moore’s interpretation of Christian principles — should provide the foundation for, and even supersede, the laws of men.

“Moore’s ideology is an express belief that God’s law and his interpretation of God’s law stand on top of man’s law,” said David Dinielli, deputy director of the Southern Poverty Law Center. “It’s an ideology that would allow those who think they know the unknowable and the mystic to impose their beliefs on everyone else.”

Moore's pursuit of political power

Moore’s public presentation is that of a private citizen forced against his will to enter into service of his country. He likes to cite the apocryphal tale of Cincinnatus, the Roman general who chooses to turn down vast political powers to return to his farm, and of Thomas Paine at Valley Forge comparing the “summer soldier" and "sunshine patriot" to soldiers willing to tough out long Revolutionary winters. A fan of evoking colonial imagery and rhetoric, Moore even rode his brown mare — named “Sassy,” an aide said — to the polling station on election day.

“I’m not a politician. I don’t like politicians,” Moore told a gun rights group gathered at Mr. Fang's Chinese restaurant in Homewood on Monday night.

About 15 seconds later, he felt the need to press the point, and returned to it: “I am not a politician," he said. "I do not like politics."

Moore was 35 when he first ran for, and lost, a judicial post in Etowah County in 1982. "I had decided to run for political office in order to do what I could to preserve our moral heritage," he writes in his autobiography, So Help Me God: The Ten Commandments, Judicial Tyranny, and the Battle for Religious Freedom. Among those threats, as Moore lists them: a 1985 court case eliminating prayer in the courthouse and a 1963 Supreme Court ruling eliminating Bible studies in public schools.

That loss proved so bitter that afterward he took up karate and became a black belt; moved to Cairns, Australia, where he worked as a kitchen hand; and then herded cattle in the Australian Outback, building stockyards and carrying rocks six days a week.

But Moore has clung to the campaign trail on and off since he returned. He ran for district attorney in 1986 (losing again); for chief justice of Alabama's Supreme Court in 1999 (he won, though he was forced to step down in 2003); was floated for a run for president with the Constitution Party in 2004; ran for governor of Alabama in 2006 (losing in the GOP primary); ran for governor again in 2010 (and lost again); and then formed an exploratory committee for the 2012 presidential elections before dropping out.

At the gun rights event in Homewood, Moore lowered his head as the leader of the gun rights group ticked through the judge’s accomplishments on the bench. Moore then took the mic.

"When I hear you say what I’ve done, I think to myself, it’s really not what I’ve done; it’s what God has done through me by putting me in a position to stand for what I believe," Moore said. "I’m not running for this position. I’m running to serve God and his will.”

Moore’s fundamentalist views on religion

The core of Moore’s ideology is that he denies the legitimacy of state law when it conflicts with his perception of Christian precepts. To Moore, that’s because the state derives its legitimacy from God — so if law passed by men contradicts that which he perceives as the law of God, the former should have no power over him or his countrymen.

This conviction resulted in the two high-profile national stories that gave Moore the name recognition now powering his Senate run. The first was his decision to install a monument to the Ten Commandments at his courthouse. Despite direct orders from a federal judge, Moore then refused to remove the monument or to cease holding a prayer session in his courtroom.

“The Judeo-Christian God reigned over both the church and the state in this country, and that both owed allegiance to that God,” he told the Atlantic at the time.

Moore’s defense in the Ten Commandments case is instructive. One conservative defense of the tablets could be that local courts should have the freedom to erect whatever monuments they want. This was not Moore’s argument. Instead, he said that the Ten Commandments should stay because they really are divine, and therefore more important than human law.

"The Ten Commandments are not only a sacred text in the Jewish and Christian faiths, as the Supreme Court stated in Stone v Graham," he writes. "They are God's revealed, divine law and the basis on which our morality depends."

Moore was suspended again in 2015 after refusing to issue marriage licenses to same-sex couples. “Moore has ... encouraged lawlessness by attempting to assemble a virtual army of state officials and judges to oppose the federal judiciary and its ‘tyranny,’” the SPLC wrote at the time.

It’s worth paying attention to exactly why Moore wrote in a 2006 LifeNet column that Rep. Keith Ellison, a Muslim, could not be seated by Congress. Moore argued that the Constitution is founded on specifically Christian principles; anyone whose beliefs fall outside Christian principles, by definition, falls outside that of the Constitution as well.

“The Islamic faith rejects our God and believes that the state must mandate the worship of its own god, Allah,” he writes. “Islamic law is simply incompatible with our law.”

Moore’s religious explanation for where religion’s reach ends

When I asked Moore where he believes religion’s involvement in public life should end, Moore said that the state should not force citizens to follow a certain faith.

“You can’t force people to worship God in any matter,” he said.

But that restriction itself, he added, stems from Christian principles. He defended the First Amendment’s protection of the free exercise of conscience not on the grounds that the state has a vested interest in pluralism, but because Jesus himself believed in it.

“You see, the First Amendment was established on Christian principles, because it was Jesus that said this: ‘Render therefore unto Caesar the things which are Caesar's; and render unto God the things that are God's,’” Moore told me.

Islamic people practicing under “Sharia law,” Moore said, didn’t have First Amendment protections because First Amendment protections are inescapably Christian.

“That’s a Christian concept,” he said of the ability to worship according to one’s conscience. “It’s not a Muslim concept. Go to Saudi Arabia. Go to Afghanistan, Iran, Sudan, and be a Muslim, and see if you can exit that faith without consequences. You can’t do it. You understand? Understand that it’s a Christian concept.”

The NAACP and gay rights groups are worried about Moore’s rise

Moore’s fundamentalism has helped him advance politically and build a base of support in Alabama. But it has scared those in the state who believe it puts them on the other side of Moore’s interpretation of God’s intentions.

Moore has made an already difficult life for gay Alabamans even harder, said Alex Smith of Equality Alabama, an LGBTQ rights organization.

“We are very concerned about Moore becoming a senator,” Smith told me. “It’s been incredibly terrifying for LGBT folks in the state to watch.”

Smith gave one example: Eight judges in Alabama are still not issuing marriage licenses to couples of either sex, following the guidelines of Moore’s order intended to prevent gay couples from wedding in the state.

New anti-LGBTQ legislation is on its way. In May, Republican Gov. Kay Ivey signed the Child Placing Inclusion Act into law. It allows some agencies to deny LGBTQ couples the ability to adopt children; Moore’s nonprofit, the Foundation for Moral Law, was instrumental in its passage, according to Smith.

"Being gay in the South isn't the easiest thing," said Russell Howard, director of Druid City Pride. "But it's a whole lot harder when you have someone with Mr. Moore's positions in power."

Hezekiah Jackson, president of Birmingham's NAACP chapter, argued it would be a mistake to view God as behind Moore’s politics. Instead, he said that Moore’s religiosity represented a clever front to appeal to identity groups — Christians, white men, heterosexuals.

"His thing is simple: He's a proponent of his own people,” Jackson said. “That's it. It's just obvious."

In Washington, Senate Majority Leader Mitch McConnell already faces an insurrectionist caucus on his right flank — Sens. Rand Paul (KY), Mike Lee (UT), Ted Cruz (TX) — that believes the Republican establishment is too eager to compromise with Democrats.

Moore would go further than any of them. If he makes it to Capitol Hill, he’d bring a new conservative rebelliousness to the Senate chamber — informed by an eye toward God.