In 2007, then-Defense Secretary Robert Gates delivered the commencement address at William and Mary. (By Stephen Salpukas — Courtesy College of William and Mary )

Former defense secretary Robert M. Gates is heading back to campus, five years after leaving the president’s office at Texas A&M University for Washington.

The College of William and Mary on Tuesday announced that Gates has been named the school’s next chancellor, an honorary appointment that will return the former secretary to his alma mater. Gates will succeed former Supreme Court justice Sandra Day O’Connor, whose term ends in February.

Gates has uttered nary a peep publicly since leaving the Pentagon and returning to Washington state at the end of June. He has said he is planning on writing two books — a memoir and a treatise on leadership — and on joining the well-trodden speaking circuit of former Washington officials.

At William and Mary, in Williamsburg, Gates takes an office that is somewhat loosely defined. While he is not expected to move there, he will visit regularly to meet with students and others on campus.

A release from the school says the chancellor “plays an important role in the life of the university, participating in major ceremonies and other events on campus.”

The release helpfully adds that, while an undergraduate at William and Mary in the 1960s, Gates served as a dormitory manager, an orientation aide and as an active member in the Young Republicans.

Gates will be the college’s 24th chancellor. His predecessors include Henry Kissinger and Margaret Thatcher.