President Trump says he knew Republican Alabama Senate candidate Roy Moore would lose in Tuesday’s special election — and that his prediction was correct.

“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,” Trump tweeted early Wednesday. “I was right! Roy worked hard but the deck was stacked against him!”

“If last night’s election proved anything,” he added, “it proved that we need to put up GREAT Republican candidates to increase the razor thin margins in both the House and Senate.”

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! Roy worked hard but the deck was stacked against him! — Donald J. Trump (@realDonaldTrump) December 13, 2017





If last night’s election proved anything, it proved that we need to put up GREAT Republican candidates to increase the razor thin margins in both the House and Senate. — Donald J. Trump (@realDonaldTrump) December 13, 2017





Yet the president repeatedly supported Moore, an alleged predator of teen girls, even as other Republicans shied away. At a campaign rally less than 20 miles away from the Alabama border last weekend, Trump said that the “future of the country” depended on his victory.

Democrat Doug Jones defeated Moore on Tuesday night in a stunning victory that sent shockwaves throughout the GOP. The deep red state had not voted for a Democrat in a Senate race in 25 years. Moore is refusing to concede the race.

Trump backed Strange in the primary, and at a campaign rally in Alabama in September, the president suggested that Moore could lose.

“You’ve got to beat a Democrat,” Trump said. “Luther is going to win easily and Roy’s going to have a hard time winning. But I will be backing him if he wins [the primary]. I will be backing him, OK? I’ll tell you that.”

View photos Republican Senate candidate Roy Moore looks at election returns with staff during an election-night watch party in Montgomery, Ala., on Tuesday. (Photo: Brynn Anderson/AP) More

Both Trump and the White House initially distanced themselves from Moore after allegations from multiple women were published by the Washington Post. Ivanka Trump, Trump’s daughter and White House adviser, said there is “a special place in hell for people who prey on children.”

“I’ve yet to see a valid explanation and I have no reason to doubt the victims’ accounts,” she said.

But days before Thanksgiving, President Trump signaled his tacit support for Moore, pointing to Moore’s fierce denials.

“Look, he denies it,” Trump told reporters. “He says it didn’t happen, and you know, you have to listen to him also.”

By Election Day, Trump had thrown his full support behind Moore, recording a robocall and urging voters to turn out for a Republican who had vowed to support him.

View photos President Trump talks with the reporters as first lady Melania Trump and their son Barron wait for him before departing the White House for Palm Beach, Fla., on Nov. 21. (Carlos Barria/Reuters) More

“We need somebody in that Senate seat who will vote for our ‘Make America Great’ agenda,” Trump said at a rally in Pensacola, Fla., on Friday. “So get out and vote for Roy Moore. Do it, do it.”

Steve Bannon, Trump’s former chief strategist, campaigned hard for Moore and disparaged Republicans who refused to back him.

“Mitch McConnell and Sen. [Richard] Shelby, and Condi Rice and all that, Little Bobby Corker, all the establishment out there doesn’t have Trump’s back at all,” Bannon said at a rally on Monday. “There’s a special place in hell for Republicans who should know better.”