WASHINGTON — Democrats said Wednesday their U.S. Senate victory in Alabama could lead to a sweeping comeback for the party in 2018 elections, while Republicans sought to assess blame for a defeat in one of the country’s most conservative states.

Doug Jones, a Democrat and former federal prosecutor, won the special election Tuesday night after a bitter campaign that drew national attention amid sexual misconduct accusations against conservative Republican candidate Roy Moore.

President Donald Trump had endorsed Moore and the loss was a stunning upset for him and fellow Republicans, narrowing their majority in the Senate to 51-49. It also boosted Democrats who hope to retake control of Congress in elections next November.

Trump, speaking to reporters at the White House, said the Alabama outcome would not affect his policy agenda. Republicans are rushing to pass a tax overhaul package by the end of the year. Jones is expected to take office in early January after the election results are certified.

“Wish we would have gotten the seat,” Trump said. “A lot of Republicans feel differently. They’re very happy with the way it turned out.”

At a news conference in Birmingham, Ala., on Wednesday, Jones said he received congratulatory calls from Trump as well as Senate Majority Leader Mitch McConnell, R-Ky., and Sen. Chuck Schumer of New York, the Democratic leader.

Some congressional Republicans were quick on Wednesday to slam former Trump strategist Steve Bannon for his steadfast support of Moore, saying it split the party and paved the way for Jones’ shocking victory.

Jones, 63, was the first Democrat elected to the Senate from Alabama in a quarter-century, and the party sees potential nationwide.

“This campaign has given a lot of people a reason to believe,” Jones said.

Schumer said the defeat of Moore reflected a distaste among voters for Trump’s policies, which he said help the wealthy and powerful to the detriment of the middle class.

“Things are looking good for us,” Schumer told reporters. “If they [Republicans] continue to run the government for the benefit of the few special powerful wealthy interests, there will be many more Alabamas in 2018.”

Some Senate Republicans expressed relief that Moore would not be joining their ranks, including Bob Corker of of Tennessee, a frequent Trump critic who is retiring next year.

“I know we’re supposed to cheer for our side of the aisle … but I’m really, really happy with what happened for all of us in our nation, for people serving in the Senate, to not have to deal with what we were likely going to have to deal with should the outcome have been the other way,” Corker said.

Bannon, Trump’s former chief White House strategist, worked hard for Moore as part of his broader campaign against more centrist Republican leaders, and his critics were quick to attack on Wednesday.

“This guy does not belong on the national stage,” Republican Rep. Peter King of New York said on CNN. “He’s not representing what I stand for. I consider myself a conservative Republican. … And he sort of parades himself out there with his weird, alt-right views that he has. And, to me, it’s demeaning the whole governmental and political process.”

Moore, a hard-line conservative who was twice removed from his seat on the Alabama Supreme Court for refusing to abide by federal law, became the Republican candidate by beating incumbent Sen. Luther Strange in a primary race earlier this year. Strange had been appointed to fill the seat vacated by Republican Jeff Sessions when he became Trump’s attorney general.

McConnell and other Republican leaders in Congress backed Strange in that race and then pressured Moore to withdraw his candidacy after he faced allegations from several women that he sexually assaulted or pursued them when they were teenagers and he was in his 30s.

Moore, 70, denied the accusations.

McConnell, who has been a frequent Bannon target, declined to address Bannon’s role in the race when speaking to reporters Wednesday.

“It was quite an impressive election,” McConnell said. “It was a big turnout and an unusual day.”

Strange had harsh words for Bannon.

“He has accomplished one thing that I don’t think anybody in America thought was possible, and that’s getting a Democrat elected in the state of Alabama,” Strange said on Fox News Channel.

Trump backed Strange in the Republican primary but then endorsed Moore and threw his full support behind him even as other party leaders in Washington walked away.

Trump tried Wednesday to minimize the damage to his own credibility.

“The reason I originally endorsed Luther Strange (and his numbers went up mightily), is that I said Roy Moore will not be able to win the General Election. I was right!” he said on Twitter. “Roy worked hard but the deck was stacked against him!”

Some Republicans defended Trump.

“It had zero to do with Donald Trump,” Republican Rep. Bradley Byrne of Alabama told MSNBC, calling the race “a purely weird, unique election.”

Jones’ victory was not expected to affect pending votes in Congress on funding the government or the Republican overhaul of the tax code. Republican congressional leaders have vowed to get the tax changes approved before Christmas.

The Alabama outcome could push Democrats to make sexual harassment a key election issue at a time when many powerful men in entertainment, the media and politics — including Trump — have faced accusations of misconduct. Such a move could help boost support from women.

The results also highlighted Jones’ success in mobilizing African-American voters, who constituted about 30 percent of those voting Tuesday and overwhelmingly voted Democratic, according to network exit polls.

Jones also fared surprisingly well in suburban counties outside cities such as Birmingham and Huntsville, a trend that has Republicans nervous ahead of next year’s elections, when dozens of congressional districts are likely to be highly competitive.

Part of the reason for that in Alabama was that many upscale Republican voters did not vote as compared with last year’s presidential election.

Follow the Bangor Daily News on Facebook for the latest Maine news.