President Obama and former Secretary of State Hillary Clinton staked out their chosen positions on the 2007 surge in Iraq based on what they thought would help win the 2008 presidential campaign, the two admitted to former Defense Secretary Robert Gates.

“Hillary told the president that her opposition to the [2007] surge in Iraq had been political because she was facing him in the Iowa primary," Gates wrote in his book Duty: Memoirs of a Secretary at War. The Washington Post obtained a copy of the book and reported on it Tuesday.

"The president conceded vaguely that opposition to the Iraq surge had been political. To hear the two of them making these admissions, and in front of me, was as surprising as it was dismaying," Gates wrote.

"Gates's version of why Clinton opposed the surge fits perfectly into this existing good-politics-makes-good-policy narrative about the former secretary of state," WaPo's Chris Cillizza notes in a look-ahead to 2016. "And that's what makes it dangerous for her -- and why you can be sure she (or her people) will (and must) dispute Gates's recollection quickly and definitively."

Elsewhere in the book, Gates praised Clinton as "a superb representative of the United States." With respect to the president, Gates described the decision to attack Osama bin Laden's compound as "one of the most courageous decisions I had ever witnessed in the White House.”