While many wanted her gone, Wasserman Schultz was determined to stay at all costs.

Obama, looking to avoid a fight, kept her on, a decision that may haunt him for years to come.

Wasserman Schultz’s mismanagement of the DNC weakened the Democrats and aided Donald Trump’s improbable bid for the White House. Now much of Obama’s legacy – from Obamacare to the Iran Deal to the Paris climate accord – is likely to be undermined by his successor.

#ImWithHer

In 2008, as Obama and Hillary Clinton battled for the Democratic nomination, Wasserman-Schultz was on the frontlines as Clinton’s campaign co-chair.

Late into the primary, as many were urging the party to coalesce around Obama, Wasserman Schultz continued her hard-charging campaigning for Clinton till the bitter end. (She and fellow Clinton diehard Ed Rendell became known as the “last of the Mohicans.”)

#DNCLeaks

After getting off to a rocky start at the DNC and angering fellow Democrats, Wasserman Schultz feared Obama would replace her following the 2012 election.

With her friend Clinton likely to run again in 2016, Wasserman Schultz wasn’t about to give up the DNC chair.

She began lining up allies who were prepared to accuse Obama of sexism and anti-Semitism if he removed her.

“The president just didn’t want the headache of Debbie bad-mouthing him,” a former Obama adviser toldPolitico. “It was a huge pain in the ass.”

Obama kept her on.

While the DNC is required to be neutral in presidential primaries, under Wasserman Schultz the organization took a different approach. Just how partisan the DNC became wouldn’t be clear until after Clinton wrapped up the nomination.

On the eve of the Democratic convention Wikileaks released nearly 20,000 internal DNC emails. Those emails, and subsequent ones, showed the DNC favored Clinton and worked to undermine her primary opponent, Bernie Sanders.

In the wake of the release Wasserman Schultz was forced to resign (and quickly given a top post in Clinton’s campaign).

While the DNC leaks shined a bright light on the organization’s bias, signs of foul play were evident beforehand.

When Democratic presidential contender Martin O’Malley looked at his party’s debate schedule – just six debates in total, with several of them on weekends when viewership is lowest – he proclaimed it “rigged.” Sanders agreed.

It appeared Clinton and Wasserman Schultz had learned their lesson from 2008, when Democrats held 25 debates. These had provided Obama, then a little-known first-term senator from Illinois, the national exposure he needed to overtake Clinton.

Level Playing Field = Stronger Candidate

It wasn’t just Obama who benefitted from a fair 2008 primary (which was overseen by then-DNC chair Howard Dean, who’s seeking to lead the DNC once again).

By keeping the playing field level, Democrats ensured they were putting forward their strongest candidate. Obama roundly defeated John McCain in the general election, which also saw Democrats expand their majorities in both the House and Senate.

By gutting the party’s 2016 debate schedule, Wasserman Schultz may have helped Clinton, but in so doing she delivered a devastating blow to her party.

Like Obama’s 2008 campaign, Sanders’ campaign was catching fire, particularly among younger voters. Rather than embrace millions of passionate Sanders supporters – who could play a crucial role in the general election, as Obama’s 2008 campaign showed – the DNC undermined their candidate.

It wasn’t just Sanders who lost out. By stacking the deck for Clinton, the Democratic Party ended up putting forward the second-most disliked major party nominee in modern history.

The most disliked? Trump, the next president, who’s committed to rolling back Obama’s achievements.