Democratic presidential candidates Hillary Clinton and Bernie Sanders sparred over the merits of capitalism and traded barbs about their credentials on gun control during a tense debate aimed at appealing to liberal-leaning US voters.

Ms Clinton, who is trying to slow momentum from her chief rival for the Democratic presidential nomination, directly attacked the US senator from Vermont for saying the United States should model its economy after European countries such as Denmark, Sweden and Norway.

"I think what Senator Sanders is saying certainly makes sense in the terms of the inequality that we have. But we are not Denmark. I love Denmark. We're the United States of America," Ms Clinton said.

Mr Sanders, a self-described "democratic socialist," said he did not subscribe to the capitalist system.

"Do I consider myself part of the casino capitalist process by which so few have so much and so many have so little, by which Wall Street's greed and recklessness wrecked this economy? No, I don't," he said.

Mr Sanders is polling ahead of Ms Clinton in the early voting state of New Hampshire and drawing large crowds at campaign events nationwide.

The two candidates also clashed over gun control, an increasingly potent issue in the election after repeated school shootings across the country.

Ms Clinton, 67, said Mr Sanders, 74, had not been tough enough on the issue and said he had voted against a provision that would have held gun manufacturers more accountable.

Mr Sanders has pushed for what he calls a sensible approach on gun control and voted against the 1993 Brady handgun bill that President Bill Clinton signed into law.

Asked to defend himself, Mr Sanders said he supported the expansion of background checks for people wanting to buy guns and to scrap gaps in the law that make it easier to sell and buy guns at gun shows.