President Trump reportedly blamed Attorney General Jeff Sessions for Republican Roy Moore’s loss in Alabama earlier this month because his departure from the Senate to lead the Justice Department necessitated the race.

Trump lamented the loss of the Senate seat to the Democrats and partly put the blame on Sessions for taking up the position at the Justice Department, which triggered the special election, according to a report from the Associated Press on Tuesday.

Doug Jones became the first Democrat in over two decades to win a U.S. Senate seat in Alabama, the deep-red state that Trump carried by about 28 points during the 2016 presidential election.

He won the race by a margin of 21,000 votes against Moore, the embattled Republican candidate tainted by sexual misconduct allegations, despite receiving a resounding endorsement from Trump in the run-up to the voting day.

Trump has long expressed his concerns with Sessions, going as far as to say in July that he would have not hired him if he knew Sessions was going to recuse himself from the investigations into the alleged Russian interference in the 2016 election.

“Sessions should have never recused himself, and if he was going to recuse himself, he should have told me before he took the job and I would have picked somebody else,” Trump told The New York Times.

The attorney general recused himself from the probe amid revelations that he held two meetings with the Russian ambassador. During a press conference announcing the decision, he said he will not take part in any investigation “related in any way to the campaign for president of the United States.”

The president perceived the move as a sign of retreat and attacked Sessions on Twitter, calling him “beleaguered” and “very weak” for not taking a stronger position on Hillary Clinton’s email scandal.

At the time, he was privately considering the option of firing Sessions but the idea was met with resistance from advisers who said the attorney general is well-supported among his base due to the tough-on-crime approach and it could only further inflame the investigations.

The Associated Press contributed to this report.