Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

PHILADELPHIA — Debbie Wasserman Schultz has been ousted as chairwoman of the Democratic National Committee on the eve of the party's convention. It's an abrupt end to a chairmanship marked by controversy, which came to a head this weekend following revelations from leaked internal emails.

"Going forward, the best way for me to accomplish those goals is to step down as Party Chair at the end of this convention," Wasserman Schultz said in a lengthy statement Sunday announcing her resignation, referring to her desire to unify the party.

Wasserman Schultz said she plans to step down at the end of the convention, though some Democrats are already saying she may not last that long. "As Party Chair, this week I will open and close the Convention and I will address our delegates about the stakes involved in this election not only for Democrats, but for all Americans," Wasserman Schultz added.

Ohio Rep. Marcia Fudge has been selected to serve as chair of the Democratic National Convention, which kicks off Monday. Democratic National Committee Vice Chair Donna Brazile will serve as Interim Chair through the election, a DNC spokesperson said on Twitter.

The highly neurotic Debbie Wasserman Schultz is angry that, after stealing and cheating her way to a Crooked Hillary victory, she's out! — Donald J. Trump (@realDonaldTrump) July 24, 2016

As recently as Friday, there was no sign of trouble and Wasserman Schultz was set to lead the convention, according to sources.

Wasserman Schultz spoke at two Hillary Clinton rallies in Florida Friday and Saturday, including the one where presumptive vice presidential nominee Tim Kaine appeared publicly for the first time.

But opposition to Wasserman Schultz, both public and private, had been gaining steam following the publication late last week of leaked emails which seemed to show a plot by DNC officials to damage Bernie Sanders during the Democratic primary.

The revelations created doubts from various sectors of the party about how Wasserman Schultz could oversee a convention meant to showcase party unity.

By late Saturday, opposition inside the party "spread like wildfire," according to a Democratic source close to the matter. It resulted in a tense confrontation Sunday when officials told Wasserman Schultz she had to go.

Wasserman Schultz had become toxic to supporters of Sanders, who accused her of rigging the Democratic presidential nominating process in favor of Clinton.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Democratic National Committee Chair Debbie Wasserman Schultz Richard Drew / AP

In a statement, Sanders said that Wasserman Schultz had made "the right decision" but repeated his criticism of the party for what he describes as the DNC putting its thumb on the scale during the primary contest.

"Debbie Wasserman Schultz has made the right decision for the future of the Democratic Party," he said. "While she deserves thanks for her years of service, the party now needs new leadership that will open the doors of the party and welcome in working people and young people. The party leadership must also always remain impartial in the presidential nominating process, something which did not occur in the 2016 race."

But starting even before that, many Democrats had privately lost confidence in her leadership.

"She's essentially a pariah in every corner of the party," said one veteran Democratic strategist, who spoke on condition of anonymity to discuss internal politics. "This has needed to happen for a long time."

For instance in late May, after a news report that Democrats were considering ousting Wasserman Schultz, Senate Democratic Leader Harry Reid called her to say he would not put out a statement defending her.

Wasserman Schultz also overrode the White House and the Clinton campaign in her choice of communications director for the DNC last fall. The key role went vacant for five months as the various parties tried to find a candidate acceptable to her, with some allies criticizing the process and outcome.

Even Clinton allies questioned the DNC's heavy-handed approach to dealing with the Sanders campaign during a data breach incident in December, worrying that it would undermine the credibility of a nominating process they hoped to win.

Wasserman Schultz had already effectively lost control of the DNC after Clinton's campaign inserted operative Brandon Davis to run operations on a day-to-day basis.

The Clinton campaign also recently sent a second staffer, Adam Parkhomenko, from its Brooklyn headquarters to serve in a senior role on the committee.

But internal DNC emails posted online by Wikileaks late last week became the catalyst for her official removal.

One email showed the party's finance chairman suggesting the DNC use what they assumed to be Sanders' atheism against him in Kentucky and West Virginia, religious states where it might not play well.

Others showed Wasserman Schultz criticizing Sanders for not being a member of the party and saying he would never be president.

The emails were apparently stolen by hackers working for the Russian government, and Clinton officials have said their posting is an attempt to sway the election for Donald Trump.

The emails implicate other DNC officials, including CEO Amy Dacey, a close Wasserman Schultz ally who is well respected by other Democrats, and communications department officials.

Meanwhile, Wasserman Schultz is facing a surprisingly tough congressional reelection campaign back home in Florida against a primary candidate backed by Sanders.

Wasserman Schultz, who began her tenure as chair in 2011, proved herself to be a prodigious fundraiser for fellow Delegates and an effective party surrogate and attack dog.

"I want to thank my longtime friend Debbie Wasserman Schultz for her leadership of the Democratic National Committee over the past five years," Clinton said a statement accepting the chairwoman's resignation.

Wasserman Schultz served as a co-chair of Clinton's 2008 presidential campaign and Clinton said Sunday that the Floridian will serve as "honorary chair" of her campaign's 50-state program and continue to serve as a surrogate for her campaign nationally and in Florida.

Her detractors inside the party had resigned themselves to Wasserman Schultz's leadership through November, comforted by the fact that she had been marginalized by Clinton aides.

Even some critics in the Clinton campaign and White House thought it would be better to keep Wasserman Schultz than to risk presenting an image of disunity by forcing her out.

On Sunday, critics passed around a tweet Wasserman Schultz sent last week to her counterpart at the Republican National Committee, Reince Preibus. "Hey @Reince — I'm in Cleveland if you need another chair to help keep your convention in order," she wrote.

Priebus, who faced his own challenges managing a fractured party at the GOP's convention in Cleveland last week, told reporters Sunday that Wasserman Schultz's resignation was "inevitable," adding "it shows what an uphill climb the Democrats are facing this week in unifying the party."