As widely expected, former Alabama Supreme Court Chief Justice Roy Moore, well known for his anti-LGBT views, has clinched the Republican nomination for U.S. senator from the state in today's Republican primary runoff.

Moore bested Luther Strange, who had been appointed to the Senate seat vacated by Jeff Sessions when he became U.S. attorney general. Strange’s ideology is nearly identical Moore’s, although his rhetoric is less incendiary. The Human Rights Campaign’s Alabama affiliate had called the race a choice between “bad” (Strange) and “worse” (Moore), while Strange’s alliances with “establishment” Republicans like Senate Majority Leader Mitch McConnell cost him support among the populist and religious segments of the far right.

The AP called the race for Moore about 8:20 p.m. Central time. The runoff was necessary because neither candidate won a majority of the vote in the August 15 party primary, which drew nine Republican contenders, with Moore and Strange emerging as the top two. Moore will now face Democrat Doug Jones, a progressive, LGBT-friendly candidate and well-regarded former federal prosecutor, in the December 12 general election. Jones won his August primary outright. Gov. Kay Ivey called a special election for the Senate seat this year instead of waiting until the next scheduled election in 2018.

"For conservative opponents of the current Republican leadership, the victory was a godsend — literally, for many — and a validation of the larger effort to replace the current leadership of the Republican Party with a more populist crowd," Michael Scherer wrote in The Washington Post.

Moore led Strange in polling through most of the campaign. The former chief justice had the support of such favorites of the populist right as Sarah Palin and Steve Bannon, although this wing’s hero, Donald Trump, campaigned for Strange. Strange was Alabama’s attorney general before being appointed to the Senate; in the former position he represented the state in several lawsuits opposing President Barack Obama’s policies.

In his victory speech, Moore pledged to support Trump. "Together we can make America great!" he said. "We can support the president. Don’t let anybody in the press think that because he supported my opponent that I do not support him and support his agenda."

He added, "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 has made headlines throughout his career for his extreme right-wing positions, particularly his hostility to abortion and LGBT rights, stances that are ostensibly rooted in his conservative Christian beliefs. He was removed as chief justice of the Alabama Supreme Court twice. The first time was in 2003, when he defied a federal court order to remove a Ten Commandments monument from the state courthouse grounds; the federal court had ruled that the monument was an unconstitutional establishment of religion by a government body.

Alabama Supreme Court justices are elected, and voters returned Moore to the court as chief justice in 2012. But he was removed from the court for good over his efforts to stop marriage equality from coming to Alabama. The state’s Judicial Inquiry Commission last year ruled that he had violated ethical standards in doing so, and a special court of retired judges upheld that ruling on appeal this year.

Moore had contended that Alabama county probate judges, who are in charge of issuing marriage licenses, did not have to follow the U.S. Supreme Court’s 2015 ruling that struck down all remaining state bans on same-sex marriage. That was, to say the least, an incorrect understanding of the ruling. But Moore had opposed marriage equality and, indeed, any semblance of equal rights for LGBT citizens for years.

In a 2002 child custody case that came before the Alabama Supreme Court, Moore and a majority of his fellow justices gave custody to an abusive father rather than a lesbian mother. Moore wrote in that ruling that homosexuality is “abominable, detestable, unmentionable, and too disgusting and well known to require other definition or further details or description.”

Moore has said marriage equality will “literally cause the destruction of our country or lead to the destruction of our country over the long run”; that transgender people have a mental disorder; and that actions against opponents of marriage equality are similar to the persecution of Jews in Nazi Germany.

With Alabama being a deeply conservative state, it will be no surprise if Moore wins the general election. But some polls indicate Jones has a chance; one showed him running statistically even with either Moore or Strange. After finishing law school in the late 1970s, he was staff counsel to the Senate Judiciary Committee under Howell Heflin, the last Democrat Alabamians sent to the U.S. Senate.

Later, Jones worked as both a prosecutor and a defense attorney. In 1997, President Clinton appointed him U.S. attorney for the Northern District of Alabama. In that capacity, he led the prosecution of two of the men who bombed a black church in Birmingham in 1963, killing four young girls and injuring 16 other people. Thomas Blanton and Bobby Frank Cherry were both convicted of murder, in 2001 and 2002 respectively. They were two other suspects in the case — Robert Chambliss, who was convicted of murder in 1977, and Herman Frank Cash, who died in 1994, before he could be tried.

So Moore will face a Democrat with an impressive record, and the extreme conservatism that has endeared him to some voters will undoubtedly be off-putting to others. There is “concern, improbable as it sounds, that Moore could prove controversial enough to lose in December against Democratic nominee Doug Jones,” CNBC editor at large John Harwood wrote on the cable channel’s website.

“It may put the seat in play if Moore wins,” Republican pollster Whit Ayres told Harwood in advance of the runoff. “I know it sounds ridiculous to think of a Democrat winning Alabama these days, but it also sounded ridiculous to think that Scott Brown could win in Massachusetts.” He was referring to Republican Brown’s upset win over Democrat Martha Coakley in 2010 to fill the Senate seat left open by the death of Democratic icon Ted Kennedy.

Jones issued this statement tonight, according to AL.com, a website for several Alabama newspapers: “Even though I was not on the ballot today, our campaign has been building momentum for weeks with hundreds of volunteers signing up to join our effort, Republicans reaching out to us throughout the state, and our campaign just finishing our strongest week of fundraising. We started our general election campaign more than a month ago and are seeing increased energy moving toward December 12.” Former Vice President Joe Biden will campaign for Jones in Alabama next week, Politico reports.

But Washington Post editorial writer Stephen Stromberg warned, “Moore is still almost certain to beat Jones. And, like Trump, Moore would make an unusually toxic addition to Washington. A man who brandished a revolver in one of his recent campaign rallies, Moore touts politics that are raw and identity-based, appealing to those who believe that conservative Christian religious culture should infuse the civic institutions that govern all of us. ... Roy Moore stands for anarchy, disorder, disunity and conflict. His platform just got higher, and his power more considerable. Every minute he is in a position of national prominence, the country loses.”

LGBT rights groups quickly warned of the danger Moore would post in the Senate. “Roy Moore keeps getting fired from jobs yet he continues to ask the people of Alabama for a promotion. Despite being removed from office twice for ethical violations, Roy Moore has succeeded in becoming the Republican nominee for U.S. Senate,” said Eva Kendrick, HRC Alabama state director, in a press release. “Given Roy Moore’s track record of flouting laws and attacking the civil rights of LGBTQ people across our state, we already know he won’t stand up for all Alabamians when it matters most. In the run up to December 12, we urge every fair-minded person across Alabama to say #NoMoore and reject the politics of bigotry and hate.”