Democratic presidential candidate Hillary Clinton won unexpected support from chief rival Bernie Sanders on Tuesday for her use of a private email server as U.S. secretary of state, helping to defuse an issue that has overshadowed her campaign.

Echoing comments she has made before, Clinton said her decision to not use a government email address was a mistake, but she emphasized that she wanted to focus her energy on policy issues that were more important to voters.   

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

RELATED: Donald Trump's tweets were the top trend on Twitter during the #DemDebate

The crowd roared and Clinton beamed.

"Thank you, Bernie," she said, smiling broadly and shaking hands warmly with the U.S. senator from Vermont amid enthusiastic applause.

The moment of warmth contrasted with earlier clashes that the two candidates had over capitalism, gun control and U.S. policy in Syria.

Clinton has said her email server in her New York State home was used for convenience and not to skirt transparency laws. The Federal Bureau of Investigation has taken the server and other computer hardware to determine whether sensitive government information was mishandled in Clinton’s email correspondence.

The issue has hurt Clinton in polls and given fodder to the slate of Republican presidential candidates who would like to be her rival in the November 2016 general election.

Five hopefuls took part in Tuesday night's Democratic Party debate. 

One of them, former Rhode Island Governor Lincoln Chafee, who has been critical of Clinton in the context of the emails, said it was important that the next president adhere to the best in ethical standards. 

Asked by the moderator if she wanted to respond, Clinton answered, to applause, with one word: “No.”

CLASH OVER ECONOMY

Clinton, who is trying to slow Sanders' momentum, directly attacked him 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," Clinton said.

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.

RELATED: Bushwick is Bern-ing: Young Brooklynites get behind Sanders presidential bid

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

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

Clinton, 67, said 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.

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, 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. 

The two leading candidates were joined by Chafee, former Maryland Governor Martin O'Malley and former U.S. Senator James Webb of Virginia in the first of six scheduled debates in the race to be the party's nominee in the presidential election.

One person who was not on the stage but loomed large over the debate: Vice President Joe Biden, who is considering launching his own run for the nomination.

Clinton took a veiled shot at Biden by emphasizing her involvement in President Barack Obama's decision to authorize the raid that killed former al Qaeda leader Osama bin Laden. 

Clinton was in favor of the raid. Biden advised against it.

The lesser known candidates made veiled attacks at Clinton at the top of the debate. Chafee noted he had "no scandals" during his political career; Webb said he was not co-opted by the political system.