David Petraeus affair: Who's who
Gen David Petraeus, one of America's most prominent military officers, resigned on Friday after admitting he had had an affair with his biographer Paula Broadwell.
Now the top US commander in Afghanistan, Gen John Allen, has been linked to another woman already tied to both Gen Petraeus and Mrs Broadwell.
Who is involved in the scandal?
David Petraeus' downfall is down to his liaison with Mrs Broadwell, a former military officer, academic researcher and fitness enthusiast.
She graduated from the West Point military academy, then spent 15 years in the US Army as a defence policy analyst and intelligence officer in South Korea and Germany.
In 2000 at Heidelberg Castle in Germany, she married Scott Broadwell, a flight surgeon (now a radiologist). They live in Charlotte, North Carolina, and have two sons.
After Mrs Broadwell left the army, the family moved to Boston, where she enrolled at Harvard's Kennedy School of Government. There she began a career as an academic military researcher, a path that brought her into contact with Gen Petraeus.
Mrs Broadwell, now 40, met the then-lieutenant-general in 2006 when she approached him to write an academic project on his leadership style.
Over the following years she went with him to Afghanistan as he took command of the Nato operation there and spent months working closely with him, before distilling her research into the glowing biography, All In: The Education of David Petraeus.
A friend of Gen Petraeus has said his affair with Mrs Broadwell only began in late 2011, after he had left the military to head the CIA.
In the spring of 2012, Mrs Broadwell is said to have become jealous of another woman. She allegedly sent anonymous emails to the woman, Jill Kelley, apparently warning her to stay away from Gen Petraeus.
Mrs Broadwell was listed in her North Dakota high-school yearbook as "most likely to be remembered".
Jill Kelley is a Tampa, Florida socialite who reportedly hails from a Catholic Lebanese family that immigrated to Philadelphia in the 1970s.
Mrs Kelley, 37, and her husband Scott Kelley, a surgeon, describe themselves as having been friends with Gen Petraeus and his family for more than five years.
Now Gen John Allen is under investigation after being accused of sending "flirtatious" messages to Mrs Kelley beginning in 2010.
There is no suggestion that Mrs Kelley, a mother of three daughters, had an affair with either Gen Petraeus or Gen Allen.
Both men wrote letters in September 2011 on behalf of Mrs Kelley's twin sister, Natalie Khawam, attesting to her good character in a messy custody dispute. A judge had earlier denied Ms Khawam custody of her young son, saying she appeared to lack honesty and integrity.
In May, Mrs Kelley received threatening emails accusing her of seeking an intimate relationship with the general. FBI officials say those emails were traced to Mrs Broadwell.
In Tampa, Mrs Kelley has served as an unpaid "social liaison", helping to organise gatherings at MacDill Air Force Base, which is the home of US Central Command.
Since the Kelleys moved to Tampa, they have been involved in at least nine legal actions, according to court records. Most involve real estate transactions, including a home repossession and an $11,000 (£6,930) judgment against them in a Pennsylvania case.
Gen Petraeus was stationed there before he moved to Afghanistan to run the Nato operation. Gen Allen was deputy commander there from July 2008 to June 2011.
Frederick Humphries, 47, is a veteran FBI counter-terrorism agent based in Tampa, Florida, said to have triggered the investigation that led to the discovery of the extramarital affair between Gen Petraeus and Mrs Broadwell.
Described by colleagues as a diligent agent, Mr Humphries is said to have been part of the team that investigated a foiled terror plot in 1999.
He is a personal friend of Mrs Kelley. The two are thought to have met when Mrs Kelley attended an FBI-run "citizens' academy" in 2011, the Associated Press reports. She reported anonymous email harassment to Mr Humphries in May.
But Mr Humphries was not allowed to investigate the case himself amid concerns from his superiors that he was personally involved. It has been reported that he once sent Mrs Kelley a picture of himself without a shirt on.
However, Mr Humphries is said to have been persistent in his interest in the case. According to the New York Times he contacted Washington state Republican congressman Dave Reichert to voice his concerns about those apparently involved.
Mr Reichert then arranged a phone call between Mr Humphries and House Majority Leader Eric Cantor, whose office contacted FBI director Robert Mueller.
The FBI says it was already taking the case seriously before Mr Humphries raised concerns. Whoever raised the alarm, the email trail eventually connected Jill Kelley, Paula Broadwell and David Petraeus.
Natalie Khawam, said to be currently living with her twin sister and brother-in-law, is reported to be involved in a web of legal battles including a custody dispute in which Gen Petraeus and Gen Allen have intervened.
The generals both submitted letters in support of her case to a judge in a Washington DC Superior Court. Gen Allen's letter, dated September this year, says he has known Ms Khawam for about three years and notes that she "clearly dotes" on her son.
Ms Khawam is reportedly trained as a lawyer and was previously employed by Barry Cohen, a prominent Tampa attorney.
Earlier this year she took legal action against Mr Cohen's firm, saying the company owed her money and had not acted properly on her complaints of sexual harassment with a financial officer working with them, the Tampa Bay Times reported.
Holly Petraeus, Gen Petraeus' wife of 38 years, was the daughter of the general in charge of West Point when David Petraeus was a cadet there.
Mrs Petraeus, who has long been an advocate for soldiers' families, has been without her husband for long periods in recent years, even testifying before the Senate about the impact of extended deployments on military spouses.
In January 2011 she was hired to run a veterans' affairs office at the newly established Consumer Financial Protection Bureau.
In that position, which was created as part of the Democrats' overhaul of financial services industry regulation, Mrs Petraeus is tasked with protecting armed services members from predatory lending practices.
Mrs Petraeus' father, Gen William Knowlton, was the superintendent of West Point and Gen Petraeus was a cadet there in 1973 when the couple met.
The couple have two adult children, including an army officer deployed in Afghanistan.
"This unrelenting pace of deployments is a retention issue," Mrs Petraeus said in 2003 after testifying before a Senate committee.
"Families will not be willing to go it alone forever with little relief in sight."