Clinton hammered the Independent senator from Vermont Tuesday over his record on gun control, noting that he had voted against the Brady Bill five different times. She described that bill as the foundation for the current national background check system.

Anchor Anderson Cooper asked Clinton directly if Sanders had done enough to support gun control reform.

“No,” the former secretary of State responded. “Not at all.”

“The majority of our country supports background checks, and even the majority of gun owners do,” Clinton said. “Sen. Sanders did vote five times against the Brady Bill. Since it was passed, more than 2 million prohibited purchases have been prevented. He also did vote for this immunity provision. I voted against it. I was in the Senate at the same time. It wasn’t that complicated to me. It was pretty straight-forward to me.”

Sanders defended his positions as a senator hailing from a small rural state, arguing instead for increased spending on healthcare for the mentally ill to keep guns out of their hands.

“As a senator from a rural state I can tell Secretary Clinton that all the shouting in the world is not going to do what you want, and that is keep guns out of the hands of people who should not have those guns and end this horrible violence that we are seeing,” he said.

“We can raise our voices but I come from a rural state and the views on gun control are different in rural states than they are in urban states whether we like it or not,” Sanders said.

Former Maryland Gov. Martin O’Malley piled on Sanders, declaring that “it’s not about rural or urban” and pointing to the parents of a victim from the Aurora theater shooting who were in the crowd.

“Have you ever been to Western Maryland?,” O’Malley asked Sanders. “We were able to pass [gun control reform] and still respect the hunting traditions of people, and we did it by leading with principle, not by pandering to the NRA or backing down from the NRA.”

Before hitting Sanders on gun control, Clinton also jabbed at his politics, suggesting that as a democratic socialist he would not support small businesses even as she defended his general calls to combat income inequality. 

“I think what Sen. Sanders is saying certainly makes sense in terms of the inequality that we have, but we are not Denmark,” Clinton said.

“I love Denmark. We are the United States of America, and it is our job to rein in the excesses of capitalism so that it doesn't run amok and cause the kinds of inequities that we are seeing in our economic system, but we would be making a grave mistake to turn on what made the greatest middle class.”

The sharp exchanges took place as Clinton faces an unexpectedly tough challenge from Sanders, who is leading her in polls in New Hampshire.

She has moved to the left in recent weeks, including by rejecting a trans-Pacific trade deal negotiated by President Obama.  

Sanders took a direct swipe at Clinton when the two clashed over who would be stronger in regulating Wall Street. Clinton said that as senator of New York, she went to Wall Street and told the banks to stop their foreclosures.

“In my view, Secretary Clinton, you do not, Congress does not regulate Wall Street. Wall Street regulates Congress,” he said. “You’ve got to break up these big banks, and going to them and saying ‘please do the right thing’ is kind of naïve.”

O’Malley jumped in and blasted Clinton for not supporting the reinstitution of Glass-Steagall Act.

“Right before this debate, Secretary Clinton’s campaign put out a lot of reversals on Keystone and many other things, but one of them that we still have a great difference on Madam Secretary, is that you are not for Glass-Steagall,” he said.

“You are not for putting a firewall between the speculative risky shadowy behavior. I am. And the people of this country need a president who is on their side and willing to protect the Main Street economy.”

Sanders passed on one opportunity to go after Clinton over the controversy surrounding her use of a private email account and server.

Clinton had been handed a political gift by House Majority Leader Kevin McCarthy (R-Calif.), who tied her falling poll numbers to work by the Benghazi Select Committee investigating her emails.

“This committee is basically an arm of the Republican National Committee,” Clinton said. “It is a partisan vehicle as admitted by the house Republican majority leader Mr. McCarthy to drive down my poll numbers, big surprise, and that’s what they have attempted to do. I am still standing and happy to be part of this debate.”

Sanders agreed.

“Let me say something that may not be great politics,” he said. “I think the secretary is right. The American people are sick and tired of hearing about your damn emails.”

Clinton shook Sanders's hand and thanked him after.

Clinton used the opening moments of Tuesday's debate to defend her progressive record after being put on the spot by Cooper, who cited several recent instances where she’s tacked to the right. Cooper asked Clinton directly: “Will you say anything to get elected?”

“I think that like most people I know I have a range of views rooted in my values and experience,” she said. “I don’t take a back seat to anyone when it comes to progressive experience and progressive commitment.”

Sanders sought to reach out to the minority voters who have so far received his candidacy coolly and helped Clinton to maintain a healthy lead nationally over him in the polls.

In his opening remarks, Sanders sought to highlight youth unemployment among African-Americans and Hispanics, arguing hat instead of “building more jails and providing more incarceration, maybe we should be putting more money into education and jobs for our kids.”

Later, he succinctly answered a question about “whether black lives matter or all lives matter,” a question that bedeviled him earlier in the cycle.

“Black lives matter,” the senator responded.