Before he offered any words of wisdom to the Harvard Law School Class of 2018, U.S. Sen. Jeff Flake quipped that he had come to HLS to receive advice.

“I’ll soon be in the job market myself,” Flake said. The Arizona senator announced in October that, after six years in the Senate and six terms in the U.S. House of Representatives, he would not be running for reelection.

On Class Day, May 23, Flake told the Class of 2018 assembled on a sunny Holmes Field that they were entering the legal profession in a critical moment, when the branch of government he represents “is failing its constitutional obligations to counteract the power of the president.”

That has created risks, he said, for the rule of law and its fragility; exposed the vulnerability of democratic norms; called into question the independence of the justice systems; and threatened the “cherished American value” of “truth. Empirical objective truth.”

HLS graduates will be called upon to defend these values and institutions, Flake said, and may require lawyers to risk their careers in favor of their principles. “But you–and our country–will be better for it. You can go elsewhere for a job but you cannot go elsewhere for a soul.”

Flake asked graduates to consider “the miracle of the rule of law”–how it was achieved and how we are now “testing the durability of this idea that William III first had the good sense to agree to.” Democracy is in trouble, Flake said, “if the only acceptable outcome in a matter of law or justice is a result that is satisfactory to the leader.” And it’s in trouble if “the leader attacks the legitimacy of any institution that does not pay him obeisance–say the independent judiciary or the free press.”

He told graduates: “It will be the work of your generation to make sure that this degradation of democracy does not continue.”

Flake called himself a conservative Republican. Opposing the current president, he said, did not make him less of a Republican or less of a conservative. “And opposing the president and much of what he stands for it not an act of apostasy–it is rather an act of fidelity,” he said.

Compromise must be a part of lawmaking, said Flake, “because lasting solutions to the problems before us must involve both sides … I believe that our government should include people who believe as I do, just as I believe it must include people who believe as my friend Tim Kaine [’83] does, or as my friend Cory Booker does, to name but two.”

He told the graduates, “I urge all of you to challenge your assumptions, regularly. Recognize the good in your opponents. Apologize every now and then. Admit to mistakes. Forgive, and ask for forgiveness. Speak up more, for politics sometimes keeps us silent when we should speak.”

Flake challenged the class “to be able to say in the future that we faced these forces that would threaten the institutions of liberty and tear us apart and that we said: ‘No.’ ”

“That is the job before us–to get through this, and beyond it. And you’re just the ones to take us there.”