Defense Secretary Robert Gates said Wednesday that from what he has seen, both John McCainJohn McCainUkrainians made their choice for freedom, but now need US help White House orders intelligence report of election cyberattacks Senate votes to elevate Cyber Command in military MORE and Barack ObamaBarack ObamaPresident Obama should curb mass incarceration with clemency DNC applauds Obama investigation into Russian hacking Biden: Trump will not undo most climate change policies MORE would take a "sensible approach" to Iraq once in office.

"Based on what I read in the newspapers, I think either person who is elected president is going to come in and take a close look at it," Gates said during an interview with CNN.

Despite the wide distance between Obama and McCain on Iraq, Gates said both will heavily weigh the options when approaching the "endgame" in Iraq.

"I've said repeatedly we can't get the endgame wrong. The next president would suffer the greatest consequences if we do get the endgame wrong, so I think whoever's elected is likely to take a fairly sensible approach to it," Gates said.