Democrats in the United States have been scrambling to contain damaging revelations of an insider effort to hobble Bernie Sanders' presidential campaign, with the party boss abruptly announcing her resignation on the eve of the convention to officially nominate Hillary Clinton.
Democratic National Committee chairwoman Debbie Wasserman Schultz said she would step down at the end of the convention, which opens today.
Thousands of Democratic delegates were converging on Philadelphia, the "City of Brotherly Love", to elevate Clinton as the party's nominee who will battle Republican Donald Trump in the November election.
After a hard-fought primary campaign, the party had been heading to the Democratic National Convention seeming far more unified than the Republicans, whose fissures were laid bare last week as they confirmed brash billionaire Trump as their flag-bearer.
A cache of leaked emails from Democratic Party leaders' accounts includes messages suggesting an insider effort to wound the upstart Sanders campaign that had competed with Clinton - including by seeking to present him as an atheist in deeply religious states.
Bowing to rapidly building pressure, Wasserman Schultz, the Democratic National Committee's embattled chair, announced yesterday she was stepping down at the end of the convention.
In a statement, Wasserman Schultz described Clinton as "a friend I have always believed in and know will be a great president". Her announcement came after Sanders yesterday repeated calls for her to go, with her leadership already under fire and impartiality called into question by the leaks.
Shortly after she resigned, Sanders said in a statement that Wasserman Schultz "has made the right decision for the future of the Democratic Party".
He called for new leadership that would "always remain impartial in the presidential nominating process, something which did not occur in the 2016 race".
Wasserman Schultz said she would still open and close the convention.
Despite the political chaos swirling, Sanders made clear he would not make an insurgent bid for the nomination.
"We've got to elect Secretary Clinton," he told NBC's Meet the Press.
Sanders and First Lady Michelle Obama headline day one of the Democratic convention today.
Former President Bill Clinton is the star tomorrow, while President Barack Obama and Vice-President Joe Biden take the stage on Thursday.
While Sanders has publicly endorsed his former rival, many of his most fervent supporters have been organising protests in Philadelphia, with the largest expected today.
Several thousand protesters converged near Philadelphia's City Hall yesterday, many of them Sanders backers and people supporting renewable energy and anti-fracking efforts.
They vented frustration over a "rigged" party system that they said was aimed at ensuring Clinton would become the nominee.
Many in the Sanders camp have also voiced disappointment with Clinton's choice of a centre-left running mate, Senator Tim Kaine of Virginia, and the email revelations only fuelled the resentment.
"The emails just proved what we believed to begin with," Dora Bouboulis of Vermont told AFP as she marched in a demonstration.
Trump pounced on the leaks as he tries to scoop up disaffected voters who feel Sanders - a self-described democratic socialist initially dismissed as a fringe candidate - was denied a fair shot at the nomination.
The provocative billionaire piled on after yesterday's announcement.
"I always said that Debbie Wasserman Schultz was overrated. The Dems convention is cracking up," he taunted on Twitter.
Clinton's campaign meanwhile was pushing the notion that Russia was behind the email leaks, in an effort to help Trump win.
"Experts are telling us that Russian state actors broke into the DNC, took all these emails, and now are leaking them out through these websites," campaign manager Robby Mook told ABC.
"It's troubling that some experts are now telling us that this was done by the Russians for the purpose of helping Donald Trump."
There was a decidedly anti-Hillary sentiment among the activists flocking into Philadelphia, where hundreds of the Sanders supporters gathered near City Hall and police intensifying security operations.
"Hillary is more of a warmonger than Trump!" yelled one woman as she passed out flyers.
They said what?
• The emails suggest Democratic National Committee (DNC) officials considered raising doubts about Bernie Sanders' faith, and suggesting he is an atheist rather than Jewish, apparently in hopes of steering religious voters in Kentucky and West Virginia to Hillary Clinton. DNC chief financial officer Brad Marshall wrote: "My Southern Baptist peeps would draw a big difference between a Jew and an atheist." Marshall added in a later email: "It's these Jesus thing." In response, CEO Amy Dacey said: "Amen."
• After controversy erupted over the Nevada state Democratic convention and how fair the process was there, DNC chairwoman Debbie Wasserman Schultz took exception to Sanders campaign manager Jeff Weaver's defence of his candidate's supporters. "Damn liar," she wrote in an email. "Particularly scummy that he barely acknowledges the violent and threatening behaviour that occurred."
• Wasserman Schultz took offence at an article on Politico about Sanders saying the party hadn't been fair to him. "Spoken like someone who has never been a member of the Democratic Party and has no understanding of what we do," she wrote. Sanders, for what it's worth, wasn't a Democrat before entering the Democratic primary. He caucused with the party but has long been an independent.
• DNC national press secretary Mark Paustenbach suggested pushing a narrative that Sanders "never ever had his act together, that his campaign was a mess". After detailing several arguments that could be made to push that narrative, Paustenbach concludes: "It's not a DNC conspiracy, it's because they never had their act together."
• The term "Bernie bro" - or "Berniebro", depending on your style - became a kind of shorthand for the worst kind of Sanders supporter. In an email conversation about a request made by radio show director David Guggenheim for an interview on a Clinton fundraising controversy, communications director Luis Miranda writes: "Where is Guggenheim? Is he a Bernie Bro?" Broadcast booker Pablo Manriquez responds: "Must be a Bernie Bro."