Roy Moore won’t sit in the U.S. Senate — or be expelled from it. I would like nothing more than to write his political eulogy.


But I can’t — not yet. The truth is, it’s too soon to count Moore out of Alabama politics.


This is the same man who was twice removed from the chief justiceship of the state for defying the authority of the federal courts. He came back strong both times.


The first time he was re-elected as chief justice. The second time he won the Republican primary for the U.S. Senate race that was decided Tuesday. Despite allegations of sexual assault against minors and of systematic pursuit of teenage girls, Moore managed to get enough votes to force a nail-biting finish with Democrat Doug Jones. That’s a remarkable degree of political appeal.


Moore lost the Senate race because of two factors: the sex allegations, which cost him Republican votes and some national party support, and the turnout of black voters who were pumped up by Democratic activism and spending, including a visit by New Jersey Sen. Cory Booker.


It follows that without major national support for a Democratic opponent, Moore could still win statewide office. It seems entirely possible, even likely, that he will run for statewide election again, whether for governor in 2018 or for the chief justiceship he has occupied twice. Moore, 70, might even someday run for the Senate seat held by Richard Shelby, who is 83.


Appealing as it would be to think so, the upshot of the special Senate race therefore isn’t that Alabama repudiated Moore. Nearly half of the Alabamians who turned out voted for him. To cast those votes, they had to overcome the sex charges and the ambient air of national Republican worry — plus Democratic efforts to shift votes to Jones or at least to write-in protest votes. For Moore to get that many votes under these conditions means his support among his base is rock solid. That’s not a lesson he will have missed.


And Moore isn’t the kind of person to be crushed by a defeat. He is a master of rising from the ashes. He used his first removals from the chief justiceship as a springboard to run for the governorship. And when he badly foundered in running for governor in 2006 and 2010, he never gave up. He just went back to the chief justiceship. He used his second removal from the post as a springboard for the Senate race. And in his speech Tuesday night, he did not concede, instead predicting a recount.


Moore, then, isn’t really the loser in this election. Jones counts as an accidental winner, but mostly because he was in the right place at the unlikely right time.


The real winner here was Booker, who made a last-minute swing through the state to help motivate black voters to turn out at levels that may have gone beyond even the turnout for Barack Obama, the nation’s first black president.


The lesson for the Democratic Party nationally is crystal clear: If you want to win close races against hard-core Republicans, you need to get blacks to the polls in large numbers.


Hillary Clinton could have been helped profoundly in the 2016 presidential race by black voters in the battleground states that she lost to Donald Trump. Critics of her choice of Virginia Sen. Tim Kaine as her running mate have argued that the election might have come out differently had she chosen a vice-presidential candidate who could have better inspired blacks.


Until Tuesday, it was unknown whether Booker could have a galvanizing effect on turnout. Now Booker, who grew up in New Jersey and was educated at Stanford, Oxford and Yale, has proved he can do it in the Deep South, far from his home state.


And the real loser in the Alabama race was, it’s fair to say, Trump. Having first backed interim Sen. Luther Strange against Moore, then equivocated, and finally backed Moore, Trump revealed that he was maladroit in dealing with Southern voters. In retrospect, he should have repudiated Moore and at least tried to pressure him to stand down in favor of another Republican. Indeed, Republicans can now blame Trump for the fact that Moore was ultimately in the race.


None of this national fallout will matter one whit to Moore himself. Expect him to stand tall in defeat, regroup and find his next spot to try again. The scandal around him will probably fade, as most scandals do. A state-level office would not bring major national Democratic money or attention.


And even though Republicans will beg him not to run for the Senate again, Moore could easily defy them and try, reasoning that Democratic lightning won’t strike twice.


Republican primary voters may take his defeat as not a badge of shame but a mark of honor. This, after all, is Alabama, where a glorious lost cause may stay alive for generations.


Noah Feldman is a Bloomberg View columnist. He is a professor of constitutional and international law at Harvard University and was a clerk to U.S. Supreme Court Justice David Souter. His seven books include “The Three Lives of James Madison: Genius, Partisan, President” and “Cool War: The Future of Global Competition.”