Donna Brazile, the former chairwoman of the Democratic National Committee, said on Thursday that Hillary Clinton rigged the Democratic primary so that she would prevail against Bernie Sanders.

In a piece published on Thursday in Politico Magazine, Brazile described how she had discovered an agreement made in August 2015 that Clinton would have “control (of) the party’s finances, strategy, and all the money raised” in exchange for dealing with the Democratic Party’s massive debt from the 2012 campaign for Barack Obama.

–Donna Brazile opens up about Clinton email scandal–

“Hillary for America (the campaign) and the Hillary Victory Fund (its joint fundraising vehicle with the DNC) had taken care of 80 percent of the remaining debt in 2016, about $10 million, and had placed the party on an allowance,” she explained.

It’s a move that usually comes after the primaries: the party’s nominee takes over the party. But instead, Clinton was running the financial arm of the Democratic party, and while Brazile admitted it was legal, it “looked unethical.”

“If the fight had been fair, one campaign would not have control of the party before the voters had decided which one they wanted to lead,” Brazile wrote. “This was not a criminal act, but as I saw it, it compromised the party’s integrity.”

–Donna Brazile has no regrets over contact with Clinton team–

Brazile, who lost her job as a CNN contributor after it was revealed that she had given Clinton a heads-up on debate questions, added that she had “promised” Sanders that she would look into whether Clinton had “rigged” the party system and, until she discovered that agreement, had been relieved to report that all was well.

“I had tried to search out any other evidence of internal corruption that would show that the DNC was rigging the system to throw the primary to Hillary, but I could not find any in party affairs or among the staff,” Brazile wrote. “I was happy to see that I had found none. Then I found this agreement.”

Brazile didn’t specify when she found the agreement but only noted that it was “weeks” before the election. She did say that Sanders took the news “stoically” when she informed him of what she’d learned.