Just-retired deputy attorney general Rod Rosenstein borrowed wisdom from presidents and philosophers during his commencement address at the University of Baltimore Law School on Monday.

But one sage in particular loomed large over the auditorium: the special counsel.

“As Robert Mueller once said, ‘There [may] come a time when you will be tested. You may find yourself standing alone, against those you thought were trusted colleagues. You may stand to lose [all that] you worked for. And [it may] not be an easy call,’ ” Rosenstein told graduating law students.

As the deputy AG, Rosenstein oversaw the majority of Mueller’s two-year investigation, resigning from his post roughly a month after the special counsel filed his report on Russia interference in the 2016 election. Although Rosenstein did not directly reference the probe, he did reflect on the nature of government and standing by one’s convictions during turbulent times.

“We live in a messy, contentious democracy, and democracy is built on comprise,” Rosenstein told the new grads. “You need to be prepared to compromise when you can do so without violating your principles. Of course, you will face pressure to compromise on things that matter most, perhaps even to trade virtue for the appearance of virtue. But you should exercise caution when circumstances tempt you to disregard principles.”

In his report, Mueller outlined Rosentein’s refusal to give a press conference defending President Donald Trump’s decision to fire former FBI Director James Comey, despite pressure from the White House. In spring 2017, Rosenstein told aides he did not want to participate in planting a “false story” about the firing.