Former FBI director James B. Comey is joining the faculty of his alma mater, the College of William & Mary, and plans to teach a course on ethical leadership at the school's Washington center starting in the fall.

Comey, whom President Trump fired last year, will have a nontenured position as an executive professor in education, the school announced Friday. His course will be offered through the W&M Washington Center to students of the public university based in Williamsburg, Va.

Comey will teach the course in fall 2018, spring 2019 and summer 2019 with executive assistant professor Drew Stelljes.

"I am thrilled to have the chance to engage with William & Mary students about a vital topic — ethical leadership," Comey said in a statement. "Ethical leaders lead by seeing above the short term, above the urgent or the partisan, and with a higher loyalty to lasting values, most importantly the truth. Building and maintaining that kind of leadership, in both the private sector and government, is the challenge of our time. There is no better place to teach and learn about it than the W&M Washington Program."

Trump dismissed Comey in May, contending that he had "lost the confidence of almost everyone in Washington, Republican and Democrat alike." The former FBI chief has remained in the public spotlight as a key player in events that special counsel Robert S. Mueller III is reviewing in the probe of Russian interference in the 2016 election.

The William & Mary appointment will be Comey's second academic affiliation since he left the government. Last summer, Comey agreed to give a convocation speech and series of lectures at Howard University.

In September, protesters heckled Comey when he gave a speech welcoming students to the historically black university in the nation's capital. "Get out, James Comey!" the protesters yelled. "You're not our homie!" But many others in the audience and Howard officials pleaded for the demonstrators to stop interrupting Comey and let him speak.

Comey, 57, has deep ties to William & Mary. He earned his bachelor's degree from the school in 1982, with a double major in chemistry and religion, and received an honorary doctor-of-laws degree from the school in 2008. (Comey, who also has served as deputy U.S. attorney general, earned his law degree from the University of Chicago in 1985.)

Soon after William & Mary began offering classes at its Washington center in 2006, Comey spoke there about law and politics for two hours.

"He was terrific, and the students just loved him," recalled Adam Anthony, the center's executive director. "We loved him. So we started calling him on a regular basis. He would always make time."

Anthony said Comey hosted William & Mary students at least three times at the FBI, showing them a firing range and other facilities. Anthony recalled that in March, after another appearance at the center, Comey said: "Who knows? Maybe someday I'll come back and be a professor."

"Jim Comey is among William & Mary's most distinguished alumni," the school's president, Taylor Reveley, said in a statement. "Over the years, he has been deeply committed to his alma mater. He understands to the core of his being that our leaders must have an abiding commitment to ethical behavior and sacrificial service if we are to have good government. Our students will benefit significantly from his experience and wisdom."