President Trump attacked ex-Secretary of State Rex Tillerson Friday — tweeting that the former top US diplomat was “dumb as a rock” and “lazy as hell.”

“Mike Pompeo is doing a great job, I am very proud of him. His predecessor, Rex Tillerson, didn’t have the mental capacity needed. He was dumb as a rock and I couldn’t get rid of him fast enough. He was lazy as hell. Now it is a whole new ballgame, great spirit at State!” Trump wrote.

Tillerson teed off on Trump Thursday, saying the commander-in-chief “doesn’t like to read” briefing papers and had to be talked out of taking actions that would be illegal.

“Part of it was obviously we are starkly different in our styles,” the former ExxonMobil CEO said when asked by CBS News’ Bob Schieffer how his relationship with Trump soured.

“We did not have a common value system. When the president would say, ‘Here’s what I want to do, and here’s how I want to do it.’ And I’d have to say to him, ‘Mr. President . . . you can’t do it that way, it violates the law,’ ” Tillerson said.

“He got really frustrated. I didn’t know how to conduct my affairs with him any other way than in a very straightforward fashion, and I think he grew tired of me being the guy every day that told him, ‘You can’t do

that,’” he said.

“I’d say, ‘Here’s what we can do,’ ” Tillerson continued. “ ‘We can go back to Congress and get this law changed. And if that’s what you want to do, there’s nothing wrong with that.’ I told him I’m ready to go up there and fight the fight, if that’s what you want to do.”

He did not say what actions Trump wanted to take that would have run afoul of the law.

Trump also didn’t like to have his gut instincts challenged. The president would say: “Look, this is what I believe. And you can try to convince me otherwise, but most of the time, you’re not going to do that,” Tillerson said.

Tillerson, who was fired in March, had a rocky relationship with Trump from the start — and did not even meet the man until he was given the job.

The president often belittled him on Twitter, once telling him he was wasting his time trying to negotiate with “Little Rocket Man,” North Korean dictator Kim Jong-un.

“He acts on his instincts,” Tillerson added in his first public remarks since leaving office.

“In some respects, that looks like impulsiveness, but it’s not his intent to act on impulse. I think he really is trying to act on his instincts.”

He said that coming to work for Team Trump from “disciplined” Exxon was “challenging,” and admitted that he tried without success to persuade the president not to bail on the Paris climate accords or the Iranian nuke deal.

He diverged from the president on whether Vladimir Putin could be trusted. “There’s no question,” he said about Russia’s election interference.

He also took a shot at the president’s Twitter addiction.

“It troubles me that the American people seem to want to know so little about issues, that they are satisfied with a 128 characters,” said Tillerson.