(CNN) -- The Alabama Senate race is over. And Democrat Doug Jones has pulled off an absolutely massive upset, edging embattled Republican Roy Moore.
Jones' projected victory narrows the Republican edge in the Senate, which is a very big deal for the future (or lack thereof) of President Donald Trump's policy agenda in 2018.
But, there are broader takeaways -- for Trump, the GOP and the Democratic party -- from Tuesday's result too. Here are 5 big ones.
1. The Senate is now in play in 2018
At the start of this year, the idea that Democrats would have any chance to win the Senate majority come November 2018 was regarded as a joke.
Jones' victory means that for now Democrats are only 2 seats away from the majority -- Vice President Mike Pence casts the tie-breaking vote when it is 50-50. While a Democratic move into the majority still looks like a long shot, it's now not out of the question.
Remember that Trump won Alabama by 28 points 13 months ago. A Democrat hadn't won a Senate race in the state since 1992 when then Democratic Sen. Richard Shelby won. He switched to the Republican party two years later.
Yes, Moore's profile -- and the series of allegations from women who said he pursued relationships with them while they were teenagers and he was in his 30s -- made this race uniquely competitive. But, if a Democrat can win in Alabama, a Democrat can win just about anywhere in the country.
The numbers are still daunting for Democrats: 25 Democratic seats are up in 2018 as compared to just 8 for Republicans. But, with competitive races likely for current GOP seats in states like Nevada, Arizona and Tennessee, there is now a path for Democrats to win the majority.
And that is stunning.
2. Donald Trump lost. Again.
Trump went all in for Moore in the late stages of this race. His appearance last Friday in Pensacola was a wink, wink, nudge, nudge way to rally Republican support for the flagging Republican nominee. Trump recorded a robocall for Moore, sent out a series of tweets about the race and generally worked in the final week of the campaign to make this a referendum on himself.
It didn't work. Turnout in rural counties in Alabama didn't match the booming numbers in the Democratic enclaves of the state. (More on that later.) In a state where Trump won massively just more than a year ago, his approval rating was a so-so 48% approve and 48% disapprove, according to exit polls.
There's no doubt that Trump's involvement on Moore's behalf -- against the wishes of a large chunk of the Senate Republicans -- was largely driven by a belief that the two men were kindred spirits. Both, in Trump's mind, faced unfair sexual allegations. Both made a career out of fighting the GOP establishment. Both were warriors against political correctness.
But, Roy Moore, the Donald Trump of Alabama, lost on Tuesday night. And that means Donald Trump lost too.
What it doesn't mean is that Trump will moderate his behavior in any meaningful way. Usually, when faced with a loss, Trump doubles down and insists that somehow, someway he won. This is not a man who will admit defeat even when it's staring him in the face as it is in Alabama.
3. Mitch McConnell breathes a sigh of relief. For now.
Make no mistake: Mitch McConnell did not want Roy Moore in the Senate. McConnell -- and the rest of the GOP leadership -- did everything they could to get rid of Moore. When it became clear Moore wasn't going to leave the race -- and Trump started to weigh in for the embattled GOP nominee -- McConnell threw his hands up and said it was up to the voters of Alabama to decide the race.
McConnell's unwillingness on Tuesday to even engage the prospect of what he would do if Moore won spoke to just how little the majority leader wanted Moore in the Senate.
There's no question that McConnell took a big sigh of relief when Jones was declared the winner just before 10:30 p.m. ET. In his mind, the Moore loss is short-term pain (the GOP margin shrinks to a single seat) for the long term gain (the GOP brand doesn't have to be associated with an accused child molester for the next few years.)
At issue for McConnell is that the forces at work in the Alabama race suggest that his plans to expand the GOP Senate majority in 2018 may be in trouble. If the Democratic base is anywhere near as fired up in the 2018 midterm as they were in Alabama on Tuesday, the GOP Senate map starts to look a lot less friendly.
And that's even before you consider the likely McConnell versus Steve Bannon primary fights to come in states like Arizona and Nevada.
4. The Democratic base is fired up and ready to go
For Jones to even have a chance to win, the core pillars of the Democratic base in Alabama -- especially African American voters -- had to turn out in presidential election-like numbers. No one thought that was possible -- until it happened.
Black voters comprised 29% of the Alabama electorate on Tuesday and went for Jones by 92 points, according to exit polling. In 2012, African Americans made up 28% of voters and Barack Obama won them by 91 points.
That's stunning. Jones matched the performance of the first black president in history among black voters.
There were, of course, extenuating circumstances. Moore was long seen as the Alabama Democratic base as enemy #1 -- due not only to his controversial statements on race, gender and homosexuality, but also because of his long record in the state as a lightning rod for conservative causes. Not every state, in short, has a Roy Moore.
But, this race became about more than Moore by the end of it. Due to Trump's involvement in the final days, it became a way for Democratic partisans to send a massive message -- and warning -- to the President. That message? If we can beat you here, we can beat you anywhere.
And, they delivered it. If you are a Republican running for office in any corner of the country, the results in Alabama should scare you. If they don't, you aren't paying attention.
5. Candidates and campaigns matter
Moore is, was and always will be a deeply flawed candidate. Even before the allegations of sexual impropriety arose, Moore had a history of underperforming other Republican office holders on the ballot.
Yes, he had his core base of 35% or so who would never leave him no matter what he said or what people said about him. And, in a Republican primary, that was enough. But Moore showed zero inclination or ability to ever expand beyond that hardcore base. His candidacy felt more geared toward the 1950s than 2017.
Meanwhile, Jones avoided being labeled a national Democrat and did everything he could to make the race about values -- and who better shared the values of the average Alabama voter. He didn't spend tons of time talking about abortion or guns. He talked about the economy and about how Moore let his own personal ideology get in the way of doing what was right for the state.
The lesson: Even in a state as red as Alabama, you can't nominate a massively flawed candidate and just expect the partisanship of the electorate to deliver a win for you. Particularly when the other side nominated a credible alternative.
Obama campaign manager David Plouffe summed that idea up nicely on Twitter. "Yes, Moore was unmoored," he tweeted. "But Doug Jones and his team executed one of the best campaigns in years. Much to study and learn from, both turnout and persuasion."
™ & © 2017 Cable News Network, Inc., a Time Warner Company. All rights reserved.