WASHINGTON (Reuters) - In an apparent swipe at U.S. President Donald Trump, former Secretary of State Rex Tillerson on Wednesday decried what he called “a growing crisis in ethics and integrity” in American public life.

“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 said in a graduation address at the Virginia Military Institute.

Tillerson, who was fired by Trump in March after little more than a year on the job, did not mention the U.S. president by name during his address to cadets at the school in Lexington, Virginia.

But he warned that a crisis involving truthfulness and integrity is threatening U.S. democracy.

“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 said.

“If we do not as Americans confront the crisis of ethics and integrity in our society, and among our leaders in both public and private sector - and regrettably at times even the nonprofit sector - then American democracy as we know it is entering its twilight years,” he said.

Tillerson’s speech was among his first public remarks since Trump dismissed him, ending a rocky tenure overseeing the State Department and policy disputes with the White House.

The U.S. president has frequently said or tweeted statements not backed up by fact. For example, he insisted, despite evidence to the contrary, that the crowd at his January 2017 inauguration was bigger than at predecessor Barack Obama’s.

More recently, Trump at first disputed that he was aware of a $130,000 payment made by his personal attorney, Michael Cohen, to porn star Stormy Daniels, who alleges an affair with Trump.

But another Trump attorney, Rudolph Giuliani, then said Trump reimbursed Cohen for the payment. In an ethics disclosure on Wednesday, Trump acknowledged repaying Cohen more than $100,000 for an undisclosed purpose.

In his speech, Tillerson said a commitment to facts cements U.S. alliances with other democracies worldwide.

“It is also that foundational commitment to truth and facts that binds us to other like-minded democratic nations - that we Americans will always deal with them from the same set of truths and facts,” he said. “And it is truth that says to our adversaries, we say what we mean, and we mean what we say.”