In the aftermath of Roy Moore’s defeat Tuesday, every Republican should reflect on exactly what happened and what we should be thankful for.

First, good for Alabama. When Alabamians had to stand up and do the right thing, they did. Special credit goes to Republican Sen. Richard C. Shelby, who channeled Atticus Finch. When a rabid threat had to be extinguished, he came to the rescue. With perfect timing and vivid clarity, Shelby spoke out against Moore despite having little obvious, self-serving reason to do so. Any number of things can make the difference between winning or losing in a close race, but nothing was as impactful as Shelby’s 11th-hour push.

Second, as a proud Alabamian, I think the best thing about this election is that Alabama will not have to endure or be associated with the poisonous presence of Roy Moore on the national stage in the U.S. Senate. Beyond just becoming the media’s favorite Republican, Moore would have been an indelible stain on Alabama.

To restate the obvious, Moore’s presence would have deterred economic development in a state that needs as much economic development as it can get. Not one person I have spoken to ever thought it would be a good idea for Moore to meet with a chief executive considering launching a new business or facility in Alabama. Moore’s presence would be toxic and repulsive in ways we probably could not have imagined. It’s fair to say his presence would have even affected college football recruiting.

And, oh by the way, being sensitive to Alabama’s image, I was hoping no one outside Alabama, much less overseas, would notice Moore’s rise. But the world was well aware of what was happening. I was particularly discouraged during a trip last week to Hong Kong, Dubai and London when just about everyone wanted to ask me about Moore. A lot of people I meet with in foreign capitals have harsh things to say about American politics these days. It was very disheartening that Moore was such a focal point.

Anyway, Doug Jones will be the first Democrat to represent Alabama in the U.S. Senate since 1992. His election was the result of a perfect storm defined by improbable circumstances that no one could have predicted. But wave elections are always comprised of a few lucky breaks and seemingly one-off occurrences that benefit the party catching the wave. Republicans must be true to ourselves and recognize that Jones’ election is evidence of momentum that is building against us.

Finally, Alabama did the nation a service Tuesday by defeating Stephen Bannon and his attempt to seize power in the Republican Party. I hate to say it, but there is probably no better place for Bannon’s twisted plans than Alabama. But today, I can’t imagine what state party or candidate is hoping that Bannon will show up and do for their state and campaign what he did for Moore and Alabama. Everything about the campaign and the results from Alabama made Bannon weaker.

The mainstream media were hoping a win for Moore would legitimize Bannon and accelerate his attempt at a takeover of the party. While Tuesday night was not a good night for Republicans, it was a bad night for Steve Bannon. Having more Republican votes in the Senate is always better than having fewer, but in this case, it is best that Roy Moore’s vote was sacrificed. It would not have been worth the cost to Alabama or the nation.

Ed Rogers is a political consultant and a veteran of the Ronald Reagan and George H.W. Bush White Houses and several national campaigns.