At the close of his time command-ing United States forces in Iraq, at the height of a legendary military career, General David Petraeus was lauded by his boss, then-Defence Secretary Robert Gates, as "one of our nation's great battle captains".
Often talked about as a potential Republican presidential candidate in the mould of another popular war hero, Dwight D. Eisenhower, Petraeus built a reputation during 37 years in the army as a skilled and personable leader with a penchant for publicity.
An ambitious soldier whose childhood nickname was 'Peaches', he rose quickly through the ranks after graduating from the West Point military academy in 1974.
After a decorated career, he retired from the army to become CIA director in the summer of 2011, shortly after completing 13 months as the top commander of US and coalition forces in Afghanistan.
Few could have foreseen this ending.
He sent a letter to President Barack Obama last Thursday asking that he be allowed to resign, and Obama, on Friday, said yes.
LIVED 'THE DREAM' AT CIA
He earned a master's degree in public affairs in 1985 and a doctorate in international relations in 1987 - both at Princeton University. When the campus newspaper, The Daily Princetonian, reported two months ago that Petraeus might be interested in becoming the university's president, he issued a statement in which he did not deny interest but said, "I am living the dream here at CIA."
Petraeus, 60, and his wife, Holly, have two children: a daughter, Anne, and a son, Stephen, who led an infantry platoon in Afghanistan as an army lieutenant. He and Holly were married in July 1974 in the chapel on the West Point campus.
Petraeus' career was not without its bumps. He survived an M16 round to the chest during a training exercise at Fort Campbell, Kentucky, in 1991. After his recovery, Petraeus rose through the ranks in a series of assignments that included executive assistant to the chairman of the Joint Chiefs, Gen Hugh Shelton, plus stints in Haiti and Bosnia.
In 2000, he shattered his pelvis when his parachute collapsed during a free-fall jump. He was known in his middle age to challenge soldiers half his age to push-up contests - and he would win.
During the invasion of Iraq in 2003, he led the 101st Airborne Division across the desert and won acclaim for stabilising a sector of northern Iraq that later became a stronghold of al-Qaida's Iraq affiliate. In July 2004, he graced the cover of Newsweek magazine, posing in front of a Black Hawk helicopter with the caption, 'Can this man save Iraq?'
In early 2007, Petraeus was sent back to Iraq once again, this time to execute President George W. Bush's "surge" of forces at a time when many in Washington believed the war had been tragically lost.
When he reported progress in 2007 - thumping legislative attempts by congressional Democrats to force troops home - an anti-war group took out a full-page advertisement in the New York Times that coined a new nickname for Petraeus - 'General Betray Us' - and blamed him for "cooking the books for the White House".
When Petraeus took his next assignment, as head of US Central Command, in October 2008, Gates called him the do-it-all general, "the pre-eminent soldier-scholar-statesman of his generation".