Petraeus took over as head of the Central Intelligence Agency in September 2011 after both commanding US troops in Iraq and then later heading military operations in Afghanistan.
On Friday, he resigned as head of the CIA, citing an extramarital affair.
As the US political campaign season heated up in 2012 there was talk of the 60-year-old war hero running for president — presumably as a Republican — though the ex-general did not often talk about his party affiliation.
In August, the White House was forced to deny a report that President Barack Obama feared that Republican Mitt Romney wanted Petraeus as his running mate.
Petraeus has himself repeatedly said he has no ambitions to pursue elected office, but he was nevertheless seen as highly adept at maneuvering through Washington’s power politics.
“I am not a politician, and I will never be, and I say that with absolute conviction,” Petraeus said on NBC’s “Meet the Press” in August 2010.
The retired general was revered by some as a hero, credited by his supporters for arresting Iraq’s slide into all-out civil war in 2007 and salvaging a US mission that appeared headed for collapse.
Petraeus tried a similar approach to counter-insurgency in Afghanistan, backed up by a buildup of some 30,000 American troops, and after nearly a year as commander there he claimed progress against the Taliban.
But history’s verdict on his legacy in Afghanistan remains uncertain, with the Kabul government tainted by corruption and the Taliban increasingly active as the United States prepares to withdraw most of its troops by 2014.
Petraeus kept a lower profile as spy chief but during his tenure the CIA provided “policy makers decision advantage through the best possible intelligence,” Director of National Intelligence James Clapper said.
That tenure however was also tainted by the bitter fight still raging over who is to blame for the security breakdown at the US consulate in Benghazi on September 11.
US news media suggested that the CIA’s fixation with secrecy may have led to confusion over security at the compound and crossed signals with the State Department.
According to the Wall Street Journal, the US Benghazi mission was essentially a CIA operation instead of a diplomatic post, and most staff worked for the spy agency.
US ambassador Christopher Stevens and three other Americans were killed when the compound was attacked.
When he was nominated, some former CIA officials and analysts had described Petraeus as a perfect fit for the spy agency, citing his work with intelligence operatives battling Al-Qaeda in Iraq, Afghanistan and elsewhere.
The paratrooper, who rewrote the army’s manual for counterinsurgency warfare, is a keen athlete who twice escaped death, once when he was shot accidentally during training and then during a parachute jump which went wrong.
No US general since William Westmoreland during the Vietnam War has been so influential or so prominent.
The son of a Dutch sea captain, Petraeus has long been a star in the military.
Intensely competitive, he graduated from the US Military Academy at West Point in 1974, was the top of his 1983 class at the US Army Command and General Staff College, and went on to earn a doctorate in international relations.
He commanded the 101st Airborne Division during the 2003 invasion of Iraq, and quickly secured the northern region around Mosul.
Petraeus later headed the troubled US effort to train Iraqi security forces, and then returned to the Army Command and General Staff College at Fort Leavenworth, Kansas, to oversee the new counter-insurgency manual.
It was from that position that former president George W. Bush tapped Petraeus to lead the faltering campaign in Iraq in January 2007.
His televised appearances before a restive Congress during his Iraq stint made for dramatic scenes, with the general keeping his cool during tense exchanges with war critics.
President Obama will now have to choose a new CIA head to nominate to the US Senate for approval.