President Trump took Paul Ryan to the woodshed on Thursday night — ripping the former speaker on Twitter for having an “atrocious” record and becoming “a long running lame duck failure” who left his party “in the lurch.”

“Couldn’t get him out of Congress fast enough!” Trump tweeted.

The president appeared to be lashing out at Ryan in response to a Washington Post report that included excerpts from a new book by Politico’s Tim Alberta, in which the ex-speaker claimed to have grown “numb” to Trump’s “bad” decision-making.

“Paul Ryan, the failed V.P. candidate & former Speaker of the House, whose record of achievement was atrocious (except during my first two years as President), ultimately became a long running lame duck failure, leaving his Party in the lurch both as a fundraiser & leader,” Trump blasted. “When Mitt chose Paul I told people that’s the end of that Presidential run. He quit Congress because he didn’t know how to Win. They gave me standing O’s in the Great State of Wisconsin, & booed him off the stage. He promised me the Wall, & failed (happening anyway!)”

The president concluded his condemnation of Ryan by saying he was a weak representative of the Republican Party.

“He had the Majority & blew it away with his poor leadership and bad timing,” Trump said. “Never knew how to go after the Dems like they go after us.”

The assessment is a far cry from what Trump was saying about Ryan last April, when the former speaker stepped down.

“Speaker Paul Ryan is a truly good man, and while he will not be seeking re-election, he will leave a legacy of achievement that nobody can question,” Trump tweeted. “We are with you Paul!”

The Wisconsin lawmaker had been criticizing Trump’s behavior in the White House while speaking with Alberta, chief political correspondent for Politico Magazine, for his new book, “American Carnage.”

“Those of us around him really helped to stop him from making bad decisions. All the time,” Ryan reportedly told him. “We helped him make much better decisions, which were contrary to kind of what his knee-jerk reaction was. Now I think he’s making some of these knee-jerk reactions.”

Ryan went on to describe his retirement as an “escape hatch.”

“We’ve gotten so numbed by it all,” he said. “Not in government, but where we live our lives, we have a responsibility to try and rebuild. Don’t call a woman a ‘horse face.’ Don’t cheat on your wife. Don’t cheat on anything. Be a good person. Set a good example.”