Former Secretary of State Rex Tillerson took an apparent jab at President Donald Trump on Wednesday during a commencement speech to graduates at the Virginia Military Institute, in which he deplored the nation's "growing crisis in ethics and integrity" and leaders who "conceal the truth."

Tillerson, who was fired by Trump in a tweet as the country's top diplomat in March and replaced with then-CIA Director Mike Pompeo, called on the graduates to maintain a "fierce defense of the truth."

"As I reflect upon the state of our American democracy, I observe a growing crisis in ethics and integrity," he said. "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."

Tillerson added, "When we as people, a free people, go wobbly on the truth, even on what may seem the most trivial of matters, we go wobbly on America."

Tillerson, who previously served as the chairman and CEO of ExxonMobil, had a rocky relationship with the president during his tenure in the administration. As secretary of state, he often seemed out of the loop or in disagreement with Trump on major foreign policy decisions.

The tension between Tillerson and Trump was heightened after NBC News reported last year that he had referred to the president as a "moron" after a July meeting at the Pentagon, according to three officials familiar with the incident.