Hacked emails released in daily dispatches this past week by the WikiLeaks group exposed the inner workings of Hillary Clinton's campaign leading up to her 2015 announcement that she would seek the presidency, and through this year's primary.
The thousands of emails were hacked from the accounts of Clinton campaign chairman John Podesta.
United States (US) intelligence officials have blamed the Russian government for a series of breaches intended to influence the presidential election. The Russians deny involvement.
Among the revelations from Podesta's hacked emails:
What to say about email scandal
A series of exchanges among Clinton aides and her attorney in August 2015 show internal wrangling over what to say to the public about the ongoing scandal over her use of personal email and a private server.
In one conversation, speechwriter Dan Schwerin sent Podesta and top aides a suggested statement from Clinton saying that she had asked her team to "hand over my email server, as well as a thumb drive" with her emails.
At the time, The Washington Post had reported that the FBI was looking into the security of the server and drive.
Clinton lawyer David Kendall pushed back on the statement's wording because it didn't specify that the server was being given to the Justice Department as opposed to the State Department, which was reviewing Clinton's emails for public release.
"There they go again misleading, devious, non-transparent, tricky etc," he wrote, predicting how Clinton critics might respond once the full facts came out.
In a separate exchange a day later, aides wrestled with whether an open letter from Clinton should specifically reference former Secretary of State Colin Powell in arguing that she used the same email practices as her predecessors.
They agreed to say that Clinton's actions had been “consistent with practice of prior secretaries” but to remove a reference in a fact-sheet to Powell.
Powell's private advice to Clinton about setting up private email later became public. In Powell's own emails that were hacked this year, he complained that Clinton's team was trying to blame him for her mistakes.
Clinton communications director Jennifer Palmieri in August 2015 also told her colleagues she hoped that "we could use the 'server moment' as an opportunity" for Clinton to be seen as taking a big step to deal with the controversy.
But Palmieri said it was clear Clinton "is not in the same place," unless Podesta was able to get her to change her mind.
Private email system
As news broke last year about her use of a private email server, one of Clinton's top aides suggested simply releasing all the messages from her time as secretary of state.
The email was sent on March 4, 2015, the day The Associated Press first reported that Clinton had been running a private server inside her home in New York.
Within hours of AP's reporting, Republicans from the House Select Committee on Benghazi issued a subpoena demanding Clinton's emails regarding the deadly 2012 attacks on the US diplomatic compound in Libya.
Adviser Phillipe Reines proposed that Clinton should respond by tweet: "No need for this, happy for you to have what I gave State. If they can't, I will. Bring a dolly!" referring to a moving cart.
Clinton lawyer and chief of staff Cheryl Mills responded: "Seriously?"
Reines, who had worked for Clinton at the State Department, reiterated that he was serious, though he suggested maybe a campaign spokesman could respond less "flippantly".
Mills appeared to like the idea, at least initially. "Can we implement this in the next hour?" It never happened.
Instead, Clinton's team waited more than a year as the State Department pored through more than 55,000 pages of Clinton's work-related emails from her time as the nation's top diplomat.
And the issue kept bubbling up, no matter how hard Clinton's team worked to put it behind her.
How to reply
Clinton's campaign was slow to grasp the seriousness of the email controversy and believed it might blow over after one weekend.
Two days after the AP report, her advisers were shaping their strategy to respond to the revelation.
Campaign spokesman Nick Merrill optimistically suggested that the issue might quickly blow over.
"Goal would be to cauterise this just enough so it plays out over the weekend and dies in the short term," Merrill wrote on March 6, 2015.
It did not, and instead became the leading example of Clinton's penchant for secrecy, which has persisted as a theme among her campaign critics and rivals throughout her election season.
Clinton did not publicly confirm or discuss her use of the email server until March 10 in a speech at the United Nations, nearly one week after AP revealed the server's existence.
Wall Street speeches
The campaign asked former President Bill Clinton to cancel a planned speech to a Wall Street investment firm last year because of concerns the Clintons might appear to be too cosy with Wall Street just as the former secretary of state was about to announce her White House bid.
Clinton aides wrote that Hillary Clinton did not want her husband to cancel the speech, but was eventually convinced that cancelling was the right step.
Campaign manager Robby Mook said he realised cancelling the speech would disappoint both Clintons, but said, "it's a very consequential unforced error and could plague us in stories for months".
Clintons' paid speeches have been an issue throughout the campaign, particularly Hillary Clinton's private speeches to Wall Street firms.
Bill Clinton was scheduled to speak to Morgan Stanley executives in April 2015, a few days after his wife was set to launch her bid for president.
"That's begging for a bad rollout," Mook wrote in an email from March 11, 2015.
Shuffling primary days
The Clinton campaign tried to move the Illinois presidential primary to a later date.
The campaign said a contest held after the Super Tuesday primaries might stop momentum for a moderate Republican candidate, and it emphasised that Clinton and her husband "won't forget" a political favour.
The email, from Mook to Podesta, said Obama administration officials should use their connections in the president's home state to try to push back the March 15 Illinois primary by at least a month.
"The overall goal is to move the IL primary out of mid-March, where they are currently a lifeline to a moderate Republican candidate after the mostly southern Super Tuesday," Mook wrote. "IL was a key early win for (GOP presidential candidate Mitt) Romney" in 2012.
"The Clintons won't forget what their friends have done for them," he added.
Mook suggested that Bill Daley, a former White House chief of staff and longtime Illinois power broker, should reach out to Illinois House Speaker Michael Madigan to make the request.
The effort was ultimately unsuccessful.
Bill Clinton's business
There was consternation among those closest to Hillary Clinton about how Bill Clinton's business dealings might damage his reputation and potentially affect her presidential hopes.
The emails also gave insight into tension and turmoil within the Clinton Foundation while Clinton was secretary of state.
The chief operating officer of the family charity was reported to be threatening to commit suicide over the stress.
The messages that circulated among Podesta, Chelsea Clinton and former Bill Clinton aide Doug Band detail internal tensions that simmered inside the Clinton Foundation and appear to have played a role in Band's departure from the family charity.
After Chelsea expressed concerns about Band and the private corporate advisory firm he co-founded, Teneo Holdings, Band wrote that she was "acting like a spoiled brat kid who has nothing else to do but create issues to justify what she's doing because she, as she has said, hasn't found her way and has a lack of focus in her life."
Also in December 2011, Clinton Foundation chief operating officer Laura Graham contacted Band to complain that stress she blamed on the former president and Chelsea Clinton was causing her to consider suicide.
Band wrote that when Graham called him, she was in her car parked near the water with her foot on the gas pedal.
He said he dissuaded her from hurting herself.
Hillary Clinton told bankers behind closed doors that she favoured "open trade and open borders" and said Wall Street executives were best-positioned to help reform the US financial sector, according to transcripts of her private, paid speeches that appeared in hacked emails released Oct 7.
Excerpts of the speeches given in the years before her 2016 campaign included some blunt and unguarded remarks to her private audiences, which collectively had paid her at least $26.1 million in speaking fees.
Clinton had refused to release transcripts of the speeches, despite repeated calls to do so by her Democratic primary opponent, Senator Bernie Sanders.
Among the emails was a compilation of excerpts from Clinton's paid speeches in 2013 and 2014.
It appeared campaign staff had read all Clinton's speeches and identified passages that could be potentially problematic for the candidate if they were to become public.
One excerpt put Clinton squarely in the free-trade camp, a position she has retreated on significantly during the 2016 election.
In a talk to a Brazilian bank in 2013, she said her "dream" is "a hemispheric common market, with open trade and open borders" and asked her audience to think of what doubling American trade with Latin America "would mean for everybody in this room".
Donald Trump, the Republican presidential nominee, has made opposition to trade deals a cornerstone of his campaign.
A January 2016 email from Clinton's personal lawyer, David Kendall, to Podesta followed up on a phone call to provide a history of allegations made by Juanita Broaddrick, who accused Bill Clinton of raping her in the late 1970s.
Broaddrick was among the three past accusers of the former president who attended last week's debate in St. Louis at the invitation of Trump. Clinton has denied the rape accusation made by Broaddrick, which was never adjudicated by a criminal court.
The documents in the WikiLeaks release include the affidavit that Broaddrick signed saying that Clinton did not assault her and the independent counsel's history of the Paula Jones case in which Broaddrick later received immunity from any prosecution for perjury if she changed her story.
"Voila! She did, disavowing her sworn affidavit and sworn deposition testimony,” Kendall wrote in the email to Podesta. He concluded, “Please let me know if there's anything else I can provide about this slimefest."
It turns out both Hillary Clinton and Bernie Sanders wanted the endorsement of "Curb Your Enthusiasm" star Larry David, who portrayed Sanders on NBC's 'Saturday Night Live'.
In an October 2015 email, campaign chairman John Podesta asked aides if David was supporting either candidate.
Clinton's campaign reached out to Hollywood director and producer Rob Reiner, who said David wasn't endorsing "because he is going to keep playing Bernie on SNL."
The email said that Sanders' campaign contacted David after his initial Sanders' skit on SNL "to ask him to endorse and he declined."
As Clinton's campaign geared up in 2015, her aides hoped to procure some star power to give her a boost someone sensational, but not too sensational.
Less than two weeks before her formal launch speech in New York, her scheduling director asked for a list of celebrities willing to help and said the campaign wanted options "somewhere between a high school band and Lady Gaga."
Aides quickly gave the go-ahead to using actress Julianne Moore as a surrogate and said she "might be good for launch pre-programme," referring to the part of the event before Clinton was to speak.
Former campaign aide Diane Hamwi said 'Girls' creator Lena Dunham "will do whatever, though bit more edgy."
She floated other celebrities including actors Meryl Streep, Morgan Freeman, Sarah Jessica Parker, Jesse Taylor Ferguson, Amy Poehler and Tina Fey.
In another email, Hamwi listed musical performers who would likely help if in New York: Nick Jonas, Jon Bon Jovi, Christina Aguilera, John Legend and Alicia Keys, among others.
Though she misspelled her first name, Hamwi said singer Katy Perry would "find a way to be here" for the event. Clinton's aides seemed particularly excited about the possibility of getting the band The Roots.
But Clinton's scheduling director, Alex Hornbrook, also had a bit of bad news: "There is no budget to fly anyone in."