Former CIA Director David Petraeus will assume a part-time teaching post at the University of Southern California, the school announced on Thursday.

Petraeus, who served as the commander of U.S. forces in Iraq and Afghanistan before becoming the nation’s top spy, will teach seminars on foreign relations, government and leadership, holding the title of Judge Widney Professor, a position in honor of one of the school’s founders. 

He will also serve as a mentor to student veterans on campus and as an adviser to the school’s Reserve Officer Training Corps members.

“USC is thrilled to have General Petraeus join our faculty as a Judge Widney Professor,” said President C. L. Max Nikias in a statement announcing the hire. “He embodies all the noble qualities of our founder along with a fearless commitment to excellence. His presence will have a profound impact on our students across many disciplines.”

The USC appointment is Petraeus’s second academic post since resigning from the CIA. He will also teach public policy at the City University of New York as a visiting professor beginning in August.

The former CIA director and four-star general left the intelligence agency after admitting to an extramarital affair with biographer Paula Broadwell. 

In a speech in March, he re-entered the public spotlight with a speech at USC, apologizing for the scandal and announcing efforts to help the nation’s veterans. 

“I join you keenly aware that I am regarded in a different light now than I was a year ago,” Petraeus said. “Please allow me to begin my remarks this evening by reiterating how deeply I regret — and apologize for — the circumstances that led to my resignation from the CIA and caused such pain for my family, friends and supporters.”

Petraeus said he would focus his time on helping returning service members reintegrate into civilian life, calling it a “challenging” transition for most veterans.