Sally Yates, the acting attorney general whom President Trump fired for refusing to enforce his tightened strictures on entering the country, said Wednesday that she acted out of a belief that defending the executive order would have meant falsely claiming it was not directed at Muslims.

Speaking at Harvard Law School’s Class Day ceremony, Yates depicted the episode as an example of “an unexpected moment when the law and conscience intersected.” The partial travel ban, which was blocked by the courts, would have restricted travel from seven Muslim-dominated countries.

Yates said she concluded that “defending the constitutionality of the travel ban would require the Department of Justice to argue that the executive order had nothing to do with religion, that it was not intended to disfavor Muslims … despite the numerous prior statements that had been made by the president and his surrogates regarding his intent to effectuate a Muslim ban.”

“I believed that this would require us to advance a pretext, a defense not grounded in truth. So I directed the Department of Justice not to defend the ban,” Yates told graduating law students and family members at Holmes Field.

Yates, who was deputy attorney general when she became acting attorney general in January, said she grappled for several days over whether to resign.

Sally Yates addresses Harvard Law School on Class Day 2017

<a href="https://www.youtube.com/watch?v=F2FMZFzX84k" rel="nofollow" target="_blank"><img src="https://img.youtube.com/vi/F2FMZFzX84k/0.jpg" alt="0" title="How To Choose The Correct Channel Type For Your Video Content " /></a>
Sally Yates, former deputy attorney general, delivered the keynote address for Harvard Law School’s 2017 Class Day ceremony on May 24. Courtesy of Harvard Law School

“I believed then and I believe now that resigning would have protected my personal integrity, but it would not have protected the integrity of the Department of Justice,” said Yates, who spent 27 years with the department.

The Department of Justice “isn’t just another law firm and this wasn’t just any legal issue,” Yates said. “It was about the core founding principle of religious freedom. And I couldn’t in good conscience send DOJ lawyers into court to advance an argument that the travel ban was unrelated to religion when the evidence of intent reflected that that was not the case.

“Over the course of your life and your career, you too will face weighty decisions where the law and conscience intertwine,” Yates told students. “And while it may not play out in such a public way, the conflict that you’ll feel will be no less real, and the consequences of your decision also significant.”

Such decisions often have to be made quickly, but they are based on years of experience and reflection, Yates said.

Yates was in the spotlight again this month when she told a Senate committee that as acting attorney general, she had warned White House officials that then-national security adviser Michael Flynn had lied to them about the nature of his conversations with Russian Ambassador Sergey Kislyak.

On Wednesday, Yates did not mention that testimony or the overall investigation into alleged Russian interference in the 2016 presidential election. But in discussing causes that she believes are worth fighting for, she cited “the rule of law, and the principle that our law enforcement and intelligence agencies must be free to do their work free of political interference or intimidation.”

With the Law School celebrating its bicentennial, Yates also reflected on its significant contributions over time.

“From both ends of the political spectrum … presidents, Supreme Court justices, foreign leaders, activists, CEOs, journalists, and 11 attorneys general have graduated from Harvard Law School,” she said. Other graduates “are known only to the people whose lives they have changed forever. And now all of you are following in their footsteps.”

Harvard Law School Dean Martha Minow (left) and others applaud Yates following her keynote to the Law School on Class Day. Stephanie Mitchell/Harvard Staff Photographer

Yates said that as lawyers, the graduates “not only have the unique opportunity and ability but also the attendant responsibility to foster justice in this world, to reveal truth, to stand up for the voiceless.”

“You have to decide what you believe is worth fighting for,” Yates said. She said her own list of causes includes promoting criminal justice reform, respecting law enforcement officers, holding accountable corporate executives “who lie, cheat, and steal,” and defending same-sex marriage, and she urged the students to come up with their own lists.

Yates told students that, “We are all better than our worst moments, but sometimes we’re not quite as good as we think we are, either. As bright, talented, and driven as all of you are right now, you need to give yourself the space to develop into great lawyers.”

She also advised that “the safest course is not always the best course.”

“Being bold, taking a risk and owning it, isn’t easy to do, and the instinct for self-preservation may continually draw you to the safe, risk-free course,” she said. “But I urge you to resist that instinct. Not only is a life of hedging your bets unsatisfying, but it means you’re unlikely to make much of a difference.”