PHILADELPHIA — On the eve of the party’s convention, the embattled Democratic National Committee chairwoman, Debbie Wasserman Schultz, announced Sunday she was stepping down.

The abrupt shake-up came after leaked internal emails showed the DNC favoring Hillary Clinton over Sen. Bernie Sanders in the Democratic primaries. Sanders and his supporters had called for the Florida congresswoman’s resignation, claiming the DNC had failed to stay neutral.

“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 statement released Sunday as Democrats began arriving here for their four-day convention to officially nominate Clinton to take on Republican Donald Trump.

In her statement, Wasserman Schultz, born in Forest Hills, Queens, and raised in Melville, said she would address Democratic delegates to open the convention, which some predicted could be embarrassing for the party.

“If she steps out on that stage to gavel in, there are going to be thousands of people booing her,” Jeff Weaver, Sanders’ campaign manager, said on MSNBC.

President Barack Obama, who installed Wasserman Schultz as DNC leader, and Clinton, each praised the congresswoman for her work in building the party. Obama said he was “grateful” for her organizational skills and commitment to issues. But it was clear Democrats were trying to put out the fire quickly before the convention got under way to ensure that Sanders’ supporters wouldn’t abandon Clinton.

Donna Brazile, a veteran party hand and a DNC vice chairwoman, will serve as the DNC interim chairwoman through the election, DNC spokesman Luis Miranda announced on Twitter.

Get the Newsday Now newsletter!

From the limiting of debates to the rules regarding “superdelegates,” Sanders and his camp had long maintained the DNC wasn’t staying neutral. The senator upped his criticism after the WikiLeaks report.

“This doesn’t really come as a shock to me or my supporters,” Sanders said on Meet the Press about the release of some 19,000 emails by WikiLeaks.

“The party leadership must also always remain impartial in the presidential nominating process, something which did not occur in the 2016 race,” Sanders said.

Nassau County Democratic chairman Jay Jacobs, who counts Wasserman Schultz as a “very good friend,” contended he hadn’t personally seen the DNC being unfair to Sanders, saying he only saw “an evenhandedness.” He said he was “sorry to see her go,” referring to Wasserman Schultz.

“For some people, she was a lightning rod, which I think was unfounded,” Jacobs said. “But if in her judgment, this will help in some way to cement unity,” then it was a good decision.

Carmen Hulvert, a delegate to the convention from Brooklyn and a Sanders supporter, said Wasserman Schultz’s departure was “long overdue.”

“The leaks of the DNC emails only came to confirm what we have long suspected,” Hulvert said in the lobby of the Philadelphia Loews Hotel, where the New York delegates are staying. “From day one Debbie Wasserman Schultz didn’t work with Sen. Sanders or treat him with respect.”

Daniel Podolsky, a Stony Brook University student who helped found Sea Wolves for Sanders, and came to Philadelphia for the convention, concurred.

“Everyone knew it, now we have the documents to prove it,” Podolsky said about the DNC. “It’s just a bummer that it came too late.”