University of Virginia President James Ryan announced his resignation on Friday, amid pressure from the Trump administration over the school’s diversity, equity, and inclusion (DEI) initiatives.

Ryan, who has led the university since 2018, said in a message to the UVA community that he could not “fight the federal government” in order to save his job.

“To make a long story short, I am inclined to fight for what I believe in, and I believe deeply in this University,” Ryan wrote on Friday. “But I cannot make a unilateral decision to fight the federal government in order to save my own job. To do so would not only be quixotic but appear selfish and self-centered to the hundreds of employees who would lose their jobs, the researchers who would lose their funding, and the hundreds of students who could lose financial aid or have their visas withheld.”

“This is especially true because I had decided that next year would be my last, for reasons entirely separate from this episode—including the fact that we concluded our capital campaign and have implemented nearly all of the major initiatives in our strategic plan,” he added.

According to The New York Times, the Trump administration privately encouraged the university to remove Ryan to help resolve a Justice Department investigation into the school’s DEI practices. The DOJ reportedly concluded that Ryan misrepresented efforts to eliminate DEI programming and failed to fully comply with directives to dismantle such initiatives.

The resignation follows an executive order signed by President Trump in January aimed at eliminating DEI programs from federally funded institutions. The Department of Education has launched multiple investigations into universities, alleging that diversity efforts result in discrimination against white and Asian students.

Virginia Democratic Senators Mark Warner and Tim Kaine criticized the resignation, issuing a joint statement calling it the result of “‘culture war’ traps” and adding, “This is a mistake that hurts Virginia’s future.”