5866533177_714ef34b40_b
Photo: Marta Evry / Flickr

PHILADELPHIA (Reuters) – Democratic National Committee head Debbie Wasserman Schultz resigned on Sunday amid a furor over leaked emails, throwing the party into disarray on the eve of the convention to nominate Hillary Clinton in the race for the White House.

Lingering bitterness from the heated primary campaign between Clinton and rival Bernie Sanders erupted after more than 19,000 leaked Democratic National Committee emails seemed to confirm Sanders’ frequent charge that the DNC, the administrative arm of the party, played favorites in the race.

Sanders had demanded that Wasserman Schultz resign earlier in the day.

In a statement, Wasserman Schultz said the best way for the party to accomplish its goal of putting Clinton in the White House was for her to step down.

“We have planned a great and unified convention this week and I hope and expect that the DNC team that has worked so hard to get us to this point will have the strong support of all Democrats in making sure this is the best convention we have ever had,” she said.

DNC Chairwoman Debbie Wasserman Schultz speaks at a rally before the arrival of Hillary Clinton and Tim Kaine in Miami
Democratic National Committee (DNC) Chairwoman Debbie Wasserman Schultz speaks at a rally, before the arrival of Democratic U.S. presidential candidate Hillary Clinton and her vice presidential running mate U.S. Senator Tim Kaine, in Miami, Florida, U.S. July 23, 2016. Picture taken July 23, 2016. REUTERS/Scott Audette

The furor was a blow to a party keen on projecting stability in contrast to the volatility of Republican candidate Donald Trump, who was formally nominated last week, and overshadowed preparations in Philadelphia for Clinton’s coronation as the Democratic nominee to face Trump in the Nov. 8 White House election.

The four-day Democratic convention will open on Monday. DNC Vice Chairwoman Donna Brazile will serve as interim chair through the election, the DNC said on Twitter.

Wasserman Schultz, a member of Congress from Florida who reportedly had been removed from a speaking role after the email leak, said she would address the delegates during the convention.

In a statement, Clinton thanked Wasserman Schultz and said she would serve as a surrogate for her campaign and as honorary chairwoman of a 50-state program to build the party in every part of the country.

“As president, I will need fighters like Debbie in Congress who are ready on day one to get to work for the American people,” she said.

The cache of emails leaked on Friday by the WikiLeaks website revealed DNC officials explored ways to undermine Sanders’ insurgent presidential campaign, including raising questions about whether Sanders, who is Jewish, was really an atheist.

Clinton and Sanders, an independent U.S. senator from Vermont who ran for president as a Democrat, waged a heated months-long battle for the nomination. Branding himself a democratic socialist, Sanders galvanized young and liberal voters with his calls to rein in Wall Street and eradicate income inequality.

But Sanders repeatedly voiced frustration with a DNC and party establishment that he felt was stacked against him, and the resentment from Sanders and his supporters threatened to disrupt the convention.