Under fire over her relationship with Wall Street banks, Democratic presidential candidate Hillary Clinton hit back at opponent Bernie Sanders by attacking his voting record when it comes to big banks.

"Senator Sanders, you're the only one on this stage that voted to deregulate the financial market in 2000, to take the cops off the street, to use Governor O'Malley's phrase, to make the SEC and the Commodity Futures Trading Commission no longer able to regulate swaps and derivatives, which were one of the main cause of the collapse in '08," said Clinton during a debate Sunday night.

Her attack came after the Vermont senator criticized Clinton for accepting more than $600,000 in speaking fees from Goldman Sachs in one year (she was paid $675,000 for three separate speeches to Goldman Sachs in 2013, according to a list of speech fees released by her campaign).

She was referring to the Commodity Futures Modernization Act of 2000, which led to unregulated trading of certain types of financial instruments, including over-the-counter derivatives. The authors of the 2011 Financial Crisis Inquiry Report concluded that type of derivative "contributed significantly to this crisis," and called the 2000 law banning their regulation "a key turning point in the march toward the financial crisis."

Get Breaking News Delivered to Your Inbox

Sanders, then a member of the House, voted in favor of the bill - along with 376 other members of the House. When the legislation was amended with even more provisions to guarantee the government could not regulate over-the-counter derivatives, it was added to a must-pass government funding bill. Sanders voted in favor of that too.

One thing Clinton did not mention: Her husband, former President Bill Clinton, signed the legislation into law. His administration was supportive of letting credit default swaps remain outside the reach of regulators.

Though the former president has been defensive about the role his administration played in precipitating the financial crisis, he has expressed regret about signing the Commodity Futures Modernization Act.

"If I had to do it again, I would have vetoed the bill, even though they would have passed it and overridden my veto in a heartbeat," Clinton said at a 2014 fiscal summit.