President Donald Trump and Secretary of State Rex Tillerson confer during a working lunch with African leaders during the U.N. General Assembly in New York, Sept. 20, 2017.

President Donald Trump called former Secretary of State Rex Tillerson "dumb as a rock" a day after Tillerson said the president encouraged him to break the law while he was in the administration.

"Mike Pompeo is doing a great job, I am very proud of him," Trump said on Twitter. "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!"

Tweet

Tillerson commented on his time in the Trump administration during a rare public appearance in Houston Thursday night, according to reports in local media. He said he pushed back on the president's efforts to get him to do things that were against the law.

"So often, the president would say here's what I want to do and here's how I want to do it and I would have to say to him, 'Mr. President I understand what you want to do but you can't do it that way. It violates the law,'" Tillerson said.

The former Exxon Mobil CEO said that his pushback frustrated the president. Tillerson said he offered to lobby Congress to pass legislation enabling the president to get what he wanted legally.

"We can go back to Congress and get this law changed," he said. "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."

Tillerson apparently did not elaborate on what the president asked him to do that he viewed as illegal.

Trump fired Tillerson in March after a rocky stint as America's top diplomat.

The two former businessmen battled publicly over the administration's handling of negotiations with North Korea about the country's nuclear weapons program. The two also disagreed about the Iran nuclear deal.

Tensions ratcheted up after NBC News reported that Tillerson had publicly referred to Trump as a "moron."

The White House did not respond to a request for comment. A State Department spokesperson referred CNBC to Tillerson for an explanation of his comments. Tillerson could not immediately be reached.

In May, Tillerson delivered a thinly veiled rebuke to the president during a commencement address at the Virginia Military Institute.

"If our leaders seek to conceal the truth or we as people become accepting of alternative realities that are no longer grounded in facts, then we as American citizens are on a pathway to relinquishing our freedom," he said at the time.

On Thursday, Tillerson said that the way Americans consumed news concerned him, in an apparent reference to Twitter, the president's favored tool for foreign policy announcements.

"I will be honest with you, it troubles me that the American people seem to want to know so little about issues, that they are satisfied with a 128 characters," Tillerson said.

He said that the comment was not a criticism of Trump.

"It's really a concern that I have about us as Americans and us as a society and us as citizens," he said.

WATCH: Here's how Trump's tweets can cost a company billions of dollars