Former U.S. Defense Secretary Robert Gates will have an academic building named after him at William & Mary, the university in Virginia where he holds the honorary position of chancellor, the school announced Wednesday.

Robert M. Gates Hall will be a hub for disciplines that include economic development and inequality, geopolitical conflict, national security and conservation, the school said in a statement.

Gates is the only defense secretary to be asked to stay in the post after a new president was elected, according to the Pentagon. He served under presidents George W. Bush and Barack Obama.

REPUBLICAN LAWMAKERS DEMAND 'CONSEQUENCES' FOR AUSTIN'S 'FAILURE OF LEADERSHIP' DURING MEDICAL SCARE

Gates was director of the Central Intelligence Agency under President George H.W. Bush in the early 1990s. Gates also wrote the book, "Exercise Of Power: American Failures, Successes, and a New Path Forward in the Post-Cold War World."

Former Defense Secretary Robert Gates

Former Defense Secretary Robert Gates addresses the Boy Scouts of America's annual meeting on May 23, 2014, in Nashville, Tennessee. Gates will have an academic building named after him at William & Mary, the university in Virginia where he holds the honorary position of chancellor, the school announced on March 20, 2024. (AP Photo/Mark Zaleski, File)

A $30 million gift from an anonymous donor is making the hall possible. The currently vacant Brown Hall will be renovated on the Williamsburg campus.

Katherine Rowe, the president of William & Mary, praised the donor and said Gates "has championed the power of education and scholarship to advance democracy and build a better world."

CLICK HERE TO GET THE FOX NEWS APP

Gates got his bachelor’s degree from William & Mary in 1965. He went on to earn a master’s in history from Indiana University and a doctorate from Georgetown in Russian and Soviet history. He also was commissioned as a second lieutenant in the U.S. Air Force.

"This is the greatest honor I’ve received in my lifetime," Gates said in a statement. "William & Mary is where I felt called to public service, and I can see that the call to make a difference is still felt strongly here."