WASHINGTON — President Donald Trump criticized former Republican House Speaker Paul Ryan on Friday, calling him a “baby” and a “terrible speaker,” who didn’t know what he was doing.

Trump unleashed his criticism on one of Wisconsin’s favorite sons just before leaving to go to the state he wants to win in 2020. He called the retired congressman’s record “atrocious” in the wake of unflattering comments Ryan made about Trump in a new book

”Paul Ryan let us down. Paul Ryan was a terrible speaker,” Trump told reporters on the South Lawn. “Frankly, he was a baby. He didn’t know what the hell he was doing.”

Ryan condemns Trump in “American Carnage,” by Tim Alberta of Politico. Alberta wrote that the former speaker, who retired from Congress in 2018, could not stand the idea of another two years with the Republican president and saw retirement as the “escape hatch,” according to The Washington Post. Ryan is quoted saying: “I’m telling you, he didn’t know anything about government. I wanted to scold him all the time.”

Pushing back, Trump told reporters that one day when he was making a speech in Wisconsin, he invited Ryan, who was booed.

”So for him to be going out and opening his mouth is pretty incredible,” Trump said. “Maybe he gets paid for that. Who knows?”

On Thursday evening, Trump unleashed tweets labeling Ryan as a “lame duck failure.”

”He had the Majority & blew it away with his poor leadership and bad timing,” Trump tweeted. “Never knew how to go after the Dems like they go after us. Couldn’t get him out of Congress fast enough!”

Ryan had no comment Friday on the president’s tweets about him, his spokesman Brendan Buck said.

Trump may have been angered by various revelations in the book, including accounts recalling widespread negative GOP reactions to his off-color videotaped comments in the “Access Hollywood” scandal in the closing weeks of the 2016 election campaign. Ryan’s reaction was particularly harsh.

The book recounted Ryan, who served in Congress for 20 years, saying Trump’s presidency was slipping as he was less willing to accept advice from Republicans to moderate his approach.

”Those of us around him really helped to stop him from making bad decisions. All the time,” Ryan said. “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.”

And Ryan, who often was Trump’s wing man on some congressional issues but had a strained relationship with him, was the main focus of Trump’s Twitter rage.

”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 tweeted.

Trump tweeted that when presidential candidate Mitt Romney chose Ryan as a running mate “I told people that’s the end of that Presidential run.”

”He quit Congress because he didn’t know how to Win,” Trump tweeted.