​Luther Strange? Never heard of him.

​As results showed Strange heading for defeat in a Republican Senate election in Alabama, President Trump deleted all tweets endorsing him and wrote in support of his opponent, Ray Moore, applauding him on his victory.

“Congratulations to Roy Moore on his Republican Primary win in Alabama. Luther Strange started way back & ran a good race. Roy, WIN in Dec!,” Trump wrote on the site late Tuesday.

The president returned to Twitter on Wednesday morning to say he had talked to Moore, whom he called a “great guy.”

​”​Spoke to Roy Moore of Alabama last night for the first time. Sounds like a really great guy who ran a fantastic race. He will help to #MAGA!​,” Trump wrote in the tweet.​

But Trump’s conciliatory tweet to Moore belies the president’s anger over Strange, whom he reluctantly backed amid prodding by his political team and Senate Majority Leader Mitch McConnell, according to a report on CNN.

His unease at backing Strange increased after Steve Bannon, Trump’s former top White House strategist, came out for Moore and boasted of his anti-establishment credentials.

After venting his rage over the loss, Trump went to bed “embarrassed and pissed,” the report said.

The president’s earlier tweets endorsing Strange began to disappear from his account on Tuesday night when projections showed that Moore, an ultra-conservative former Alabama Supreme Court justice, would win the race, according to ProPublica, which tracks deleted tweets.

Leading up to the runoff election to fill the seat vacated after Jeff Sessions became attorney general, Trump tweeted his support three times for “Big Luther” and tried to rally Alabama voters to ​support Strange.

Earlier Tuesday, Trump tweeted: “ALABAMA, get out and vote for Luther Strange – he has proven to me that he will never let you down! #MAGA​.”

He also wiped out a tweet from Tuesday evening congratulating Moore on the victory, in which he wrote “Luther Strange started way back & ran a good race. Roy, WIN in Nov!,” getting the month of the election wrong.

Moore tweeted a picture of him on the phone with Trump on Tuesday evening.

​”​Great to talk with President Trump tonight about #ALSen!” he wrote.

Last Friday night, Trump even flew to Huntsville, Ala., where amid a sea of people wearing “Make America Great Again” hats, he touted Strange’s determination to “drain the swamp” and vote to repeal ObamaCare.

The president said he decided to support Strange out of loyalty​ because the candidate didn’t seek any favors in return.​

“We have to be loyal in life.​ ​He never went quid pro quo, he just treated me great,” Trump told the crowd.

“And I’m calling him. He was down like quite a bit and I said, ‘I’m going to endorse you​.'”​

The race pitted Trump and McConnell against Bannon and others of his anti-establishment ilk.

The race pitted Trump and Senate Majority Leader Mitch McConnell, who supported Strange, against Steve Bannon, the president’s former top White House strategist, who campaigned for Moore.

Bannon introduced Moore, who will face off​ against Democrat Doug Jones in an election Dec. 12, before his victory party and said the election will set off a revolution across the country against the Republican establishment.

“You are going to see in state after state after state, people that follow the model of Judge Moore, that do not have to raise money from the elites, the crony capitalists, from the fat cats in Washington, DC, New York City and Silicon Valley​,​”​ Bannon said.​