Donald Trump tweeted grudging congratulations Tuesday night after Doug Jones became the first Democrat to win an Alabama seat in the U.S. Senate in a quarter of a century.

“Congratulations to Doug Jones on a hard fought victory. The write-in votes played a very big factor, but a win is a win,” Trump tweeted.

“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!” he added.

In this special election to fill the seat vacated by Attorney General Jeff Sessions, Jones term will run through January 3 of 2021.

Tuesday’s results in in the ruby red state was a stunning rebuke of Trump, who had campaigned for GOP candidate Roy Moore right up until a final tweet on election day, urging Alabamians that keeping a Republican in the seat was more important than any qualms they had about Roy Moore the man.

Voters picked the Dem, ending their perfect quarter of a century record, when presented with a GOP candidate who faced allegations of preying on teenage girls decades ago, and had expressed dubiousness about pretty much everything else added to the Constitution since the 10th Amendment, including women’s right to vote and ending slavery.

“The people of Alabama will do the right thing. Doug Jones is pro-abortion, weak on crime, military and illegal immigration, bad for gun owners and veterans and against the WALL,” Trump tweeted Tuesday morning.

“Jones is a Pelosi/Schumer Puppet. Roy Moore will always vote with us. VOTE ROY MOORE!” he added.

Trump’s Tuesday night tweet: