Debbie Wasserman Schultz, the chair of the Democratic National Committee, announced Sunday she is resigning her post amid controversy over her impartiality in the party’s primary process and leaked emails that showed her and top party staffers seeking to undermine the insurgent candidacy of Bernie Sanders.

The email release early Friday, just days before the Democratic National Convention was set to begin, cast a pall over the celebrations that were meant to highlight the unification of the party after a bitter primary season, while setting back efforts to fully line up Sanders’ supporters behind presumptive nominee Hillary Clinton. Her announcement comes hours after Wasserman Schultz’s role at the convention in Philadelphia all-but evaporated, as the convention rules committee backed away from plans to make her the permanent chair of the convention and her primetime speaking slot cancelled.

In a statement Sunday afternoon, after a day of party meetings in which top officials discussed whether she should be forced to step aside, Wasserman Schultz announced she would leave her post after the convention concludes on Thursday, saying she wants to do what she can to help Democrats and Clinton win in November. “Going forward, the best way for me to accomplish those goals is to step down as Party Chair at the end of this convention,” she said. Schultz will still open and close the Convention, she said in the statement. “I will address our delegates about the stakes involved in this election not only for Democrats, but for all Americans,” she added.

The emails, posted by Wikileaks, capture Wasserman Schultz and DNC staffers plotting to undercut Sanders in order to boost Clinton, including a message calling for someone to question whether Sanders is an atheist. The trove, which Wikileaks said comes from the compromised email accounts of seven DNC staffers, also includes criticisms of the Clinton campaign’s communications team. Clinton campaign manager Robby Mook blamed the hack on “Russian state actors” Sunday in an interview with ABC News, adding, “It’s troubling that some experts are now telling us that this was done by the Russians for the purpose of helping Donald Trump.” The DNC first revealed evidence of the hack more than a month ago after conducting an internal investigation.

For Wasserman Schultz, her resignation marks a the completion of a protracted fall from grace, as her tenure atop the party’s governing body has been marked by persistent turmoil, public flubs, and financial and organizational difficulties.

The Florida congresswoman took over the DNC in May of 2011 as a proven fundraiser and prominent cable news talking head, but by late 2014 the knives were out as many Democrats perceived she was using the post to advance her own interests. Party officials leaked that Wasserman Schultz tried to have the DNC pick up the tab for clothing for the White House Correspondents’ Dinner and the 2012 Democratic Convention, while her travel schedule at times seemed designed to boost her bid for party leadership.

“She lost the confidence of the President’s political team after it appeared she started using the DNC as her personal PAC, rather than reliably projecting his priorities and those of the party,” said a former White House aide. But lacking any obvious replacement, or a clear fireable offense, President Barack Obama kept her around.

Democratic insiders place as much blame for the state of the DNC, and Wasserman Schultz’s position on the Obama White House, accusing him of “neglect.”

The president’s disregard for his party’s governing body has been pronounced since his 2008 campaign, when he felt that the DNC was more supportive of his then-rival, Clinton. After taking office, Obama moved his campaign team into the DNC as a parallel organization for his first two years in office rather than integrating it with the party, and then spun it off when he launched his reelection bid. Obama’s fundraising priorities for his own organization, now named Organizing for Action, left the DNC far outraised by the Republican National Committee. He held the keys to his billion-dollar email list for years, rather than sharing it with the rest of the party.

Tensions flared between the White House and Wasserman Schultz, who represents a district with a large Jewish population, last year as she delayed supporting Obama’s nuclear deal with Iran, which the administration viewed as an embarrassment to the president and a gift to his Republican critics.

In a statement, Obama thanked Wasserman Schultz for her service, but made clear there was no love lost. “For the last eight years, Chairwoman Debbie Wasserman Schultz has had my back,” Obama said. “This afternoon, I called her to let her know that I am grateful.”

In a statement Sunday, Clinton thanked Wasserman Schultz for her service, and said she was looking forward to campaigning with her in Florida and nationally. “I am grateful to Debbie for getting the Democratic Party to this year’s historic convention in Philadelphia, and I know that this week’s events will be a success thanks to her hard work and leadership,” Clinton said.

Wasserman Schultz, who was co-chair for Clinton’s 2008 campaign, never shed her Clinton loyalties as the 2016 primary process began. She was criticized for limiting the number of sanctioned debates to five and for scheduling them on weekends or other nights with low viewership, interpreted by Clinton’s rivals as a way of insulating her in an uncomfortable format.

“[Wasserman Schultz] was never an honest broker in this process,” said former top Martin O’Malley aide Lis Smith. “She did the right thing by removing herself completely from the convention and spared herself and the Democrats a lot of embarrassment. Hopefully this Spurs a robust discussion about the future of the DNC—how they avoid another disaster like this and how they play a more impartial role in elections going forward.”

The Sanders campaign also attacked her for cutting off their access to the party’s data in December, after a Sanders aide used a security glitch to improperly access material developed by other campaigns.

Wasserman Schultz’s quarrels with the Sanders campaign became a frequent sideshow to the nominating contest, as the independent socialist-turned-Democrat declared the system fixed against him.

“I think she should resign, period,” Sanders said on ABC’s This Week. “I told you long time ago that the DNC was not running a fair operation, that they were supporting Secretary Clinton,” he added. “So what I suggested to be true six months ago turned out to be true.”

Even to Clinton allies, her loyalties were clear. “The debates, the data, there is no way you can convince me that it was all her,” said one longtime Democratic operative who supported Clinton in the primary.

The operative added: “She’s been forsaken by one administration and she’s been a pawn of another.”

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.