Democrat Doug Jones eked out a win over embattled Republican Roy Moore in Tuesday’s special election to fill Alabama’s U.S. Senate seat, delivering a massive boost to Democrats and leaving Republicans with only the slimmest of majorities in the upper chamber.

Mr. Jones‘ win is a major blow both politically and policy-wise for President Trump, who went all-in for Mr. Moore, saying his agenda was on the line in the race.

With 99 percent of the precincts counted, Mr. Jones had a 49.9 percent to 48.4 percent edge over Mr. Moore.

It is the first time since 1992 that a Democrat has won a Senate seat in Alabama and it’s the party’s first statewide win in any election since 2008.

“I am truly truly overwhelmed,” Mr. Jones said at his election night rally in Birmingham. “But you know folks and you have all heard me say this at one point in this campaign that the people had more in common than what divides us. We have shown not just around the state of Alabama, but we have shown the country the way that we can be unified.”

Networks called the race just before 10:30 p.m., less than three hours after the polls closed.

Mr. Moore refused to conceded, saying the closeness of the race could trigger a recount under state law.

“When the vote is this close, it is not over,” Mr. Moore told his supporters at his election night rally. “We also know that God is always in control.”

Mr. Trump, meanwhile, congratulated Mr. Jones for a “hard fought victory” and said the 1.7 percent of write-in votes “played a very big factor, but a win is a win.”

“The people of Alabama are great, and the Republicans will have another shot at this seat in a very short period of time. It never ends!” Mr. Trump said.

“This campaign has been about common courtesy and decency and making sure everyone in this state, regardless of which ZIP code you live in is going to get a fair shake in life,” Mr. Jones said.

Washington Republicans had deemed Mr. Moore a flawed candidate from the start and had tried to derail him but GOP voters in Alabama, prodded by former White House chief strategist Steve Bannon, made Mr. Moore their nominee.

Sen. Cory Gardner, Colorado Republican and head of the National Republican Senatorial Committee, said the election was a Republican loss, not a Democratic win.

“Tonight’s results are clear – the people of Alabama deemed Roy Moore unfit to serve in the U.S. Senate. I hope Senator-elect Doug Jones will do the right thing and truly represent Alabama by choosing to vote with the Senate Republican Majority,” he said Tuesday evening.

Mr. Gardner’s group did not support Mr. Moore during the election and had said his group would never accept and support Mr. Moore even if elected.

The race was upended in November when The Washington Post reported on several women who said Mr. Moore pursued relationships with them when he was a lawyer in his 30s and they were in their teens. One woman said Mr. Moore groped her when she was 14 years old.

“This election wasn’t about right versus left, it was about right versus wrong,” said Tom Perez, chair of the Democratic National Committee. “The people of Alabama sent a loud and clear message to Donald Trump and the Republican Party: you can’t call yourself the party of family values as long as you’re willing to accept vile men like Roy Moore as members.”

The Jones victory is good news for Democrats, who were unable to win a series of special House elections earlier this year, although they always outperformed their historic performances in those districts. But they won major victories in state elections last month in New Jersey and Virginia, and now add the win in ruby red Alabama.

Senate Minority Leader Charles E. Schumer of New York said Mr. Jones “was a great candidate and will be an even better Senator.”

“Roy Moore was an awful candidate and never should have gotten to the Senate,” Mr. Schumer said. “But make no mistake about it, just like in Virginia, Democrats are energized, focused on the middle class and those struggling to get there, and things are looking better and better for 2018.”

When Mr. Jones is sworn in, the GOP majority shrinks to 51-49 — leaving Senate Majority Leader Mitch McConnell with little wiggle room on legislation in the upper chamber.

Mr. McConnell, Kentucky Republican, has struggled to advance the Trump agenda on Capitol Hill, making him a favorite target of activists that support the president, including Mr. Moore, who tried to make Mr. McConnell a flashpoint in the race.

The Moore loss also raises questions over what’s next for Mr. Bannon’s quest to field an insurgent slate of candidates in the GOP primary races next year.

Sen. Jeff Flake, the Arizona Republican who has emerged as a Trump critic and a target for Mr. Bannon, responded to the results by tweeting out “Decency wins.”

Mr. Jones, a former U.S. attorney, vowed to be a bridge builder on Capitol Hill, focused on “kitchen table” issues like education and tried to make the most out of sexual misconduct accusations against Mr. Moore.

Mr. Jones outraised Mr. Moore, bringing in $11.7 million and spending $9.3 million. Mr. Moore meanwhile raised $5.2 million and spent $4.5 million.

The financial edge gave Mr. Jones a clear advantage over the television airwaves, where he ran 10 times as many commercials as Mr. Moore, according to Advertising Analytics LLC.

The Jones campaign targeted moderate Republicans living in the Alabama suburbs by reminding voters about the accusations against Mr. Moore and how GOP figures, including Sen. Richard Shelby, had distanced themselves from his campaign.

They also highlighted how he prosecuted a couple of Ku Klux Klan members involved in the 1963 bombing of the 16th Street Baptist Church that killed four African American girls.

Exit polls showed that more than half of voters said the allegations were not an important factor in their vote, and 40 percent said they were an important factor.

Voters were split over whether the allegations were true, with 26 percent saying the allegations were definitely true and 16 percent saying they were definitely false.

Exit polls showed that 98 percent of Democrats voted for Mr. Jones, while 91 percent of Republicans backed Mr. Moore.

They also found that Mr. Jones also made inroads with moderate Republicans that tend to live in the state’s suburbs, winning over nearly 20 percent of them, and suggested that Mr. Jones benefited from a strong black turnout, which comprised 30 percent of the electorate.

Sign up for Daily Newsletters Manage Newsletters

Copyright © 2020 The Washington Times, LLC. Click here for reprint permission.