The audience at Tuesday night's Democratic debate booed in response to Sen. Bernie Sanders (I-Vt.) when he criticized former Vice President Joe Biden's votes on trade and the Iraq War.

Sanders was responding to Biden for hitting him over his record on guns earlier in his career. Sanders invoked Biden's votes on other issues.

"Joe has voted for terrible trade agreements," Sanders said to boos from the audience. He also invoked Biden's support for the Iraq War.

Sanders explained that those had been "bad votes" and that he too had cast bad votes earlier in his career against the Brady Bill and the assault weapons ban. But Sanders said he now had a "D-" rating from the National Rifle Association (NRA), a powerful gun lobby.

Later in the debate, Sanders credited former New York Mayor Mike Bloomberg for his work on gun safety and said "aggressive" action was necessary on the issue.

"The American people now understand that we must be aggressive on gun safety, not be dictated to by the NRA and I am proud that I have a D-minus rating from the NRA. If elected, it will get worse than that," he said.