A Republican and holdover from the Bush administration, Gates had agreed to stay on at the request of President Barack Obama. The move was intended to maintain stability at a time of two wars.