MONTGOMERY, Ala. — Firebrand jurist Roy Moore won the Alabama Republican primary runoff for US Senate on Tuesday, defeating an appointed incumbent backed by President Trump and allies of Senator Mitch McConnell.
In an upset likely to rock the GOP establishment, Moore clinched victory over Senator Luther Strange to take the GOP nomination for the seat previously held by Attorney General Jeff Sessions. Moore will face Democrat Doug Jones in a Dec. 12 special election.
The crowd at Moore’s election party broke into loud applause as media outlets called the race. Former White House strategist Steve Bannon took the stage to introduce Moore as supporters waving flags cheered Tuesday night.
‘‘We have to return the knowledge of God and the Constitution of the United States to the United States Congress,’’ Moore told the crowd. He also said he supports the president and his agenda.
Bannon declared Moore’s win a victory for Trump, despite the president’s support for Strange.
After the race, Trump tweeted his congratulations to Moore, noting that ‘‘Luther Strange started way back & ran a good race.’’
Throughout the campaign, Moore argued the election was an opportunity to send a message to the ‘‘elite Washington establishment’’ that he said was trying to influence the race. The Senate Leadership Fund, a group with ties to McConnell, had spent an estimated $9 million trying to secure the nomination for Strange.
SLF president and chief executive Steven Law said Tuesday that Moore won the nomination ‘‘fair and square’’ and the group will now back him.
Law says Moore ‘‘has our support, as it is vital that we keep this seat in Republican hands.’’
Moore was twice elected chief justice of the Alabama Supreme Court and twice removed from those duties. In 2003, he was removed from office for disobeying a federal judge’s order to remove a Ten Commandments monument from the state courthouse lobby. Last year, he was permanently suspended after a disciplinary panel ruled he had urged probate judges to defy federal court decisions on gay marriage and deny wedding licenses to same-sex couples.
Strange told his supporters that ‘‘we wish [Moore] well going forward.’’ But he quickly shifted to his own bewilderment at the race he just finished.
‘‘We’re dealing with a political environment that I've never had any experience with,’’ he said.
Strange also thanked Trump and Vice President Mike Pence for backing him. Trump, Strange said, may ‘‘be criticized’’ for coming to Alabama on his behalf. ‘‘Sometimes it’s just about friendship . . . a common goal to make the country better,’’ Strange said.
Trump endorsed Strange in the race and tweeted support for him on multiple occasions. As polls showed Strange in danger of losing, Trump visited Alabama to campaign at a rally attended by more than 7,000 people.
Moore, propelled by evangelical voters, consolidated support from a number of anti-establishment forces, including the pro-Trump Great America Alliance and Bannon. Former Alaska Governor Sarah Palin, in a rally for Moore last week, said the judge was a better match for Trump’s ‘‘movement.’’
Trump said at the Alabama rally that he would campaign for Moore in the general election if he secured the nomination but he believed Moore would have a tougher time against the Democrat in the race.
Moore led Strange by about 25,000 votes in the crowded August primary, which went to a runoff between the two because neither topped 50 percent in the voting.
Strange, the state’s former attorney general, was appointed to Sessions’ seat in February by then-Governor Robert Bentley, who resigned two months later as lawmakers opened impeachment hearings against him. Throughout the Senate race, Strange had been dogged by criticisms of accepting the appointment from a scandal-battered governor when his office was in charge of corruption investigations.
On the outskirts of Montgomery, 76-year-old Air Force retiree John Lauer said Trump’s endorsement swayed him to vote for Strange on Tuesday.
‘‘I voted for Strange. I'm a Trump voter. Either one is going to basically do the Trump agenda, but since Trump came out for Luther, I voted for Luther,’’ said Lauer said.
Poll workers in the heavily Republican Birmingham suburbs of Helena and Pelham said voter turnout was steady, with short lines at two places when doors opened Tuesday.
Merlene Bohannon, a widow with three grown children, said she had planned to vote for Strange until seeing Bannon stump for Moore on Fox News on Monday night.
‘‘Steve Bannon and God spoke to me, and this morning when I went in I voted for Moore,’’ said Bohannon, 74.
Bannon told the crowd that Alabama can show the world ‘‘that this populist, nationalist, conservative movement is on the rise.’’