Hillary Clinton’s campaign took over the Democratic National Committee's funding and day-to-day operations early in the primary season and may have used that power to undermine her rival Senator Bernie Sanders, according to the party's one-time interim chairwoman.

The DNC official, Donna Brazile, now a political analyst, wrote in Politico Magazine on Thursday that she discovered an August 2015 agreement between the national committee and Clinton’s campaign and fundraising arm that gave Clinton “control (of) the party’s finances, strategy, and all the money raised” in exchange for taking care of the massive debt leftover from President Barack Obama’s 2012 campaign.

It wasn't illegal, Brazile said, "but it sure looked unethical."

Trending: Who Is Christian Carino, Lady Gaga's New Fiancé?

"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."

Brazile wrote that she had “promised” Sanders to find out if the DNC had intentionally “rigged” the primary system in order to prop up Clinton and assure she became the nominee. That assertion first popped up after the DNC’s emails, hacked by Russians, had been published online and showed former DNC Chairwoman Debbie Wasserman Schultz and others may have tipped the scales for the Democrat Clinton versus Sanders, an independent seeking the Democratic Party nod.

“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.”

Don't miss: As Black Holes Eat Stars, They Shoot Death Rays of Plasma Into Space

GettyImages-866839122

Getty Images/Mike Coppola

Story continues

Brazile, a former CNN contributor who was later dismissed after it was discovered she had forked over debate questions to Clinton’s campaign, claimed when she took over as party chairwoman, the DNC was $24 million in debt. Clinton’s campaign, according to Brazile, assumed that debt with its own fundraising.

“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,” according to Brazile.

Most popular: Teen Vogue Will End Print Edition As Part Of Condé Nast Cuts

Normally, candidates take over their respective party’s operations after securing the nomination, but Brazile wrote Clinton had done so almost 15 months before last year’s election.

The timeline of when all this allegedly occurred was not fully explained by Brazile, but she wrote that the discovery was made “weeks” before the election. She said she told Sanders what she found out and that he took the supposed information “stoically.”

Brazile took over as interim DNC chair, a spot now officially held by Tom Perez, back in July 2016 after Wasserman Schultz resigned.

More from Newsweek