Since last week, the Democratic party has been roiled by accusations from former Democratic National Committee chair Donna Brazile alleging that the Hillary Clinton campaign used fundraising agreements to move money into its coffers and exert influence over the party.

Since Politico first published Brazile’s account, blame among the Democrats has been cast in all directions, with former Bernie Sanders officials claiming the process was rigged, and former Clinton backers suggesting the arrangement had been mischaracterized.

But one party seemed to escape blame, despite a historic and key role in the scandal: the Supreme Court.

Back in 2014, the high court ruled on a monumental campaign finance case known as McCutcheon v. Federal Election Commission. Though the case was seen as a huge blow in campaign finance reform circles, it made only minor waves compared to the reactions that followed the court’s last major case on the issue: Citizen’s United v. Federal Election Commission.

But McCutcheon had a profound impact on the 2016 election.

How McCutcheon upended the way candidates and parties raise money

In the 5-4 McCutcheon decision, the court ruled that, while federal caps on how much a person can donate to a candidate were constitutional, aggregate caps on how much they could give to multiple candidates and parties were not.

Under U.S. election law, a person is allowed to give a single candidate no more than $2,600 for a primary and another $2,600 for a general election bid, or $5,200 in total.

In addition, a person can give up to $32,400 to a national party, such as the Democratic or Republican National Committees.

Before the McCutcheon ruling, donors also faced additional caps on all spending for an election cycle, allowing donors to give no more than $48,600 in total to all federal candidates they support and no more than $74,600 to all parties and political action committees.

In McCutcheon, the court kept the individual contribution limits but jettisoned the aggregate limits — essentially allowing wealthy donors to spend as much money as they want in an election, so long as they spread it out across a number of candidates and parties.

But there was also a loophole to get around those individual limits. So-called joint-fundraising agreements — wherein candidates and parties fundraise together and split the proceeds — were becoming increasingly popular, even before the McCutcheon ruling.

After McCutcheon, these were poised to essentially become slush funds. The rules for joint fundraising agreements hold that donors still have to comply with the individual contribution limits for each candidate or party in the agreement. But after the cash is donated, it can be divided any way those involved in the agreement see fit.

Meaning, for example, if a presidential candidate could pull together enough candidates and parties to enter into a joint fundraising agreement together, he or she could accept massive checks well beyond what individual contribution limits allowed.

How the Clinton campaign used the McCutcheon ruling to raise massive amounts of cash

It turns out, that’s precisely what the Clinton campaign did. By entering into a joint fundraising agreement with 40 state parties, the campaign could accept huge checks from wealthy donors without having to worry about contribution limits.

By July, nearly $142 million had been raised through the agreement, with the vast majority of funds going to the Clinton campaign — and the cash-strapped DNC it had been influencing. Only $800,000, or about half a percent of the money, had gone to the 40 state parties whose participation in the agreement made the high dollar donations possible.

When Wikileaks released a trove of hacked DNC emails, it was revealed that the committee had sought to hide the details of the agreement from the public. At the time Politico reports that this led the Sanders campaign to accuse the Clinton campaign of “money laundering.”

If McCutcheon hadn’t happened, and aggregate contribution limits had still been in place, such a giant joint fundraising agreement would not have been an appealing fundraising strategy.

Meaning, state parties would be free to fundraise throughout the election without funneling cash into the coffers of a failed presidential campaign, and a DNC that had been nearly bankrupted by its previous chair.

Instead, the Supreme Court created incentives for powerful presidential campaigns to use their influence over other party organizations to create a giant slush fund for big donors.