Over the last month, Donald Trump has done more to advance the cause of the Republican establishment than he ever has before: campaigning for Mitch McConnell’s chosen candidate.

But that effort, and all the prestige of the president, came up drastically short in Alabama’s special election primary.

On Tuesday night, Sen. Luther Strange — the man appointed to fill Attorney General Jeff Sessions’ seat — squared off against Roy Moore, the controversial former state Supreme Court justice.

But as polling predicted, Moore won, capturing 56% of the vote with about 75% of precincts reporting.

He will now go on to face Democrat Doug Jones, a former US attorney, in a special election in December.

Moore has the unique history of being removed from the state Supreme Court not once but twice: first, over his refusal to remove a monument to the Ten Commandments on public land despite a federal court; and second, when he refused to enforce federal rulings on marriage equality. He’s also become known over the years for his complaints that the United States has “legalized sodomy” and for suggesting that 9/11 might have been a punishment for turning away from Christianity.

In the weeks before the runoff, the Breitbart universe rallied behind Moore, the anti-establishment candidate with a strong built-in base of support in the state. Over the last week, Steve Bannon, Sarah Palin, Brit Nigel Farage, and Duck Dynasty patriarch Phil Robertson all rallied behind Moore.

Republicans poured money, time, and the imprimatur of presidential endorsement behind Strange, whose time as attorney general in the state during a scandal dogged him throughout the campaign. Still, Republicans prioritized the race specifically with the idea of keeping enough party-line voters in the Senate as the White House tries to advance an agenda on health care and taxes.

Trump himself campaigned for Strange last week in Alabama, a state where the president remains popular. (The news out of the rally, of course, ended up being a lot more about NFL protests than Strange’s candidacy.) Vice President Mike Pence, too, campaigned with Strange.

“Luther Strange is a real conservative,” the vice president told the several hundred in the audience. “He’s a leader. He’s been a real friend to President Trump. So I’ve got to tell you, Big Luther is making a big difference in Washington, DC, and he’s just getting started.”

On election night, the mood was subdued at the Strange campaign party. Around 100 supporters were on hand, but a BuzzFeed News reporter on the scene was not allowed to talk with them.

In a statement, Strange conceded the race. He will continue to serve in the Senate until the special election’s winner is sworn into office in 2018.

“From the beginning of this campaign, my priority has been serving the people of Alabama. Tomorrow I will go back to work with President Trump and do all I can to advance his agenda over the next few weeks,” Strange said in the statement. “Melissa and I appreciate the many devoted friends and family who have supported us over the past months, the many Alabamians who have given us a warm welcome in every corner of the state, and the brigade of volunteers who left it all out on the field in this campaign. I am especially grateful for the support of President Trump and Vice President Pence, as well as the strong example set by my friends Richard Shelby and Jeff Sessions. I congratulate Roy Moore on the result this evening. May God be with him and may God continue to bless Alabama and the United States of America.”

Strange’s loss was expected, based on polls leading up to the election. Early results matched their predictions, and even before his loss was officially called, the Senate Leadership Fund acknowledged his defeat.

“We are proud to have fought alongside President Trump and the NRA in support of a dedicated conservative who has loyally supported this President and his agenda,” the McConnell-linked super PAC said in a statement.