Petraeus rose to the highest echelons of the U.S. military during 37 years in uniform, and became famous for his handling of the Afghan and Iraq wars, before he moved on to head the CIA last year.
The 60-year-old resigned that post on Friday, saying in a statement that he had shown "extremely poor judgment" by engaging in an extramarital relationship.
The "other woman" was his 40-year-old biographer, Paula Broadwell, who wrote a gushing book about the ex-general entitled All In. Their affair apparently began after Petraeus had left the military, his friend and former spokesman Steve Boylan told ABC's Good Morning America on Sunday.
For some Canadians, the former commander's fall from grace may bring back memories of Daniel Menard, who was in charge of Canada's task force in Afghanistan when in 2010 it was revealed he was having an affair with a subordinate.
A year later, Menard pleaded guilty in a military court to having an illicit relationship and trying to cover it up. By then he was an unemployed civilian who was struggling to rebuild his reputation.
Military vs. civilian role
While details about Petraeus' relationship with Broadwell are still trickling out, it's doubtful that a similar fate will befall him.
That's partly because Petraeus had joined the CIA before the affair purportedly began. As such, he wasn't beholden to strict military rules on infidelity, said Bryan Bender, a national security reporter with the Boston Globe who has interviewed Petraeus and several of his top advisers.
"If it had happened while he was in uniform it would have been much more damaging to his reputation," he said by phone. "He didn't let down his troops."
Still, the resignation has left the Obama administration searching for a new CIA director at a difficult time. Investigations into the killing of American officials in Libya are ongoing, while the U.S. is struggling to navigate a bloody civil war in Syria and deal with Iran, which appears determined to pursue a nuclear program despite intensifying sanctions.
The FBI, which uncovered the affair, says it has found no evidence of a security breach, the Associated Press reports.
But Petraeus' famously close relationship with the press will help preserve his legacy to a certain extent, Bender says.
"He certainly built a lot of goodwill with the media. Part of it was his personality, but I think part of it was also just a desire, particularly in the doldrums of the Iraq war, to find a shining hero," he said.
As a result, Petraeus may be "shielded somewhat from the attack dogs," Bender said, "but that's only going to go so far."
Indeed, Petraeus' admission of infidelity has prompted some journalists to publicly re-examine their relationship with him and how they covered his work.
Where the former four-star general goes from here remains to be seen, but his skills will be in high demand in the private sector if not in government.
"He'll probably end up in industry, within the military industrial complex, because of his deep contacts inside the Pentagon and by default his relationship with the CIA, because he was director," said Sunil Ram, an international defence and security analyst and former officer in the Canadian military.
Ram said Petraeus' legacy in the long-term is intertwined with the fate of the two far-flung countries where he oversaw military operations in the years after 9/11, and whether the counterinsurgency strategy he championed is viewed as a success down the road.
If Iraq and Afghanistan become relatively stable countries whose governments are friendly to the U.S., it will boost his legacy. If those countries devolve into civil war and extremism, history will judge him in less rosy terms.
And at home in the U.S., no one should count out Petraeus' ability to bounce back after the scandal, says Brandon Tozzo, a teaching fellow at Queen's University who specializes in U.S. politics.
"We've seen a lot politicians come back after sex scandals and be pretty popular," he said, citing former president Bill Clinton and failed Republican presidential candidate Newt Gingrich as examples. "Ultimately, I think his relatively successful record as a general will end up carrying the day."
"His name was kicked around for running for the Republican nomination in 2016," Tozzo added. "Never say never in American politics."