WASHINGTON — Democrats need a series of miracles to win the Senate in 2018. They got their first one Tuesday night.

Democrat Doug Jones' stunning victory over Roy Moore in the Alabama Senate race will stir big, existential questions about the Republican Party and its warring factions. But its most immediate impact is on the simple arithmetic of next year's midterm election: Democrats now need to gain only two — instead of three — Senate seats to win a majority.

That's a huge change, especially in an election where the party might only have a chance at two other Republican-held seats. And suddenly, a Democratic Party that less than a year ago just wanted to keep its losses to a minimum in 2018 can make a run at a much bigger prize — all thanks to a once-inconceivable victory in one of the country's most conservative states.

"This is a Scott Brown moment for the 2018 midterms," said Jesse Ferguson, a veteran Democratic strategist, referring to the upset victory in 2010 of a Massachusetts Republican Senate candidate. "The early warning weather system is going off to tell Republicans that a tsunami is inbound if they don't get out of the way."

Democrats still face a difficult road to capturing a majority: The party still defends 10 Senate seats in states Donald Trump won last year, including five — Montana, West Virginia, North Dakota, Indiana and Missouri — that he won by at least 19 percentage points. Even in a good year for Democrats, incumbents such as Claire McCaskill of Missouri or Joe Donnelly of Indiana could lose and all but close off the path to a majority.

Democrats also caution that the multiple, on-the-record accusations that Moore was a pedophile make the Alabama results difficult to extrapolate to other races, when the GOP is likely to run much stronger candidates.

But the political climate, spurred by a backlash to one of the most unpopular presidents in U.S. history, has unquestionably swung in the Democrats' favor. The shift has put in play not only Nevada — the only state represented by a Republican senator that Hillary Clinton won last year — but in fast-changing Arizona, where Democrats have recruited a strong candidate in Rep. Kyrsten Sinema.

The party's momentum has reached even Tennessee, where former Democratic Gov. Phil Bredesen announced last week he would run for the state's open Senate seat.

"Not every Republican in 2018 will be as flawed as Roy Moore, but the midterm battleground is nowhere near as Republican as is Alabama," Ferguson said. "The Republican Party has been pressing the snooze button on wake-up calls like this all year long, but maybe this one will get their attention."

Top Republicans agreed.

"Republicans worked very hard to elect a Republican president and increase the majority in the Senate," said Austin Barbour, a veteran Republican strategist based in Mississippi. "They certainly don't want to give back the majority they worked so hard in 2016 to gain by losing in places like freaking Alabama. It's ridiculous."

Now, he said of the GOP Senate majority: "It's a one-vote swing. I'm absolutely worried. Fortunately in 2018 there are a lot of good Republican opportunities, but we have to nominate the right kind of candidate coming out of the primary."

Some Republicans saw the Alabama Senate race as a lose-lose scenario starting when Moore won the primary, given his long record of incendiary comments on hot-button issues including religion and sexuality.

But as the allegations of sexual misconduct with children mounted against Moore, increasingly, top national Republicans feared a Moore victory would be so damaging to the party brand that a Democratic victory would be better for the overall health of the GOP — despite the backing Moore received from Trump and the Republican National Committee.

"Democrats should be rooting for Moore and GOP'ers should be rooting for Jones, in our upside-down world of 2017 politics," said David Kochel, a veteran Republican strategist, hours before polls closed in Alabama.

Added a Republican strategist working on the midterms: "They say Democrats are in a win-win situation. I'd agree with that. Republicans only win if (Moore) loses" and the party no longer has to "deal with him."

Many Republican operatives breathed a sigh of relief when the election was called for Jones, grateful the prospect of a drawn-out ethics committee probe for Moore had been averted and hopeful that a Jones victory would deflate Democratic messaging efforts linking Moore to the rest of the GOP.

But there is also recognition that the GOP's narrow hold on the Senate just got even more tenuous. Despite controlling all of Washington, Republicans have yet to land any major legislative accomplishments, and losing what should have been one of the safest Senate seats in the country now makes their legislative hopes even more challenging, and their majority even slimmer.

A Moore loss "saves the party an embarrassment, it saves Alabama an embarrassment," said a national Republican strategist. "Then legislating becomes even more difficult. The question is, does Doug Jones represent the will of Alabama, or does he come up here and just vote with his party?"