Democratic presidential hopefuls Bernie Sanders and Hillary Clinton battled over their progressive credentials at a town hall on Wednesday, but also reflected on their spirituality, a topic that more commonly dominates the narrative on the other side of the political aisle.

Sanders, speaking at the televised event in Derry, New Hampshire, built on an earlier back-and-forth between the two candidates on Twitter and in appearances in the state, which hosts the second party-nominating contest on Feb. 9, reminding voters that he and Clinton have made different decisions on backing the Iraq war, taking money from Super PACs and energy policies.

"Some of my best friends are moderates, but you can’t be a progressive and a moderate at the same time," Sanders said at the town hall, hosted by CNN, which included questions from voters.

RELATED: Six Hillary Clinton-inspired haikus

Former Secretary of State Hillary Clinton spoke immediately after Sanders at the town hall.

“I was somewhat amused today that Senator Sanders has set himself up to be the gatekeeper on who is a progressive, because under the definition that was flying around on Twitter and statements from his campaign, Barack Obama would not be a progressive, Joe Biden would not be a progressive ... so I’m not going to let that bother me," she said.

Her campaign issued a press release during Sanders' appearance, listing Clinton's efforts "fighting for progressive causes" including health care and education.

"I know where I stand, I know who stands with me, I know what I’ve done," Clinton said.

Moderator Anderson Cooper, referring to criticism from Sanders that Clinton is too close to Wall Street, asked her about the more than $600,000 she received from speaking to the investment bank Goldman Sachs.

“That’s what they offered,” Clinton said, adding that the payments haven't had any effect on her calls to rein in the big banks.

RELATED: Clinton super PAC offered Vermont newspaper 'off the record' anti-Sanders 'tips': Report

The two candidates arrived in New Hampshire on Tuesday, a day after Clinton marked a narrow victory in the Iowa caucuses, the first nominating contest leading up to the Nov. 8 presidential election.

Sanders, an independent U.S. senator from Vermont who is a democratic socialist, is polling more than 15 points ahead of Clinton in New Hampshire, but is trailing her nationally by roughly the same amount.

During the town hall, Sanders fielded a question about how he would appeal to a broader swath of the electorate, including minority and religious voters – blocs he will need to draw to the polls if he hopes to maintain momentum against Clinton in upcoming nominating contests in the South and West.

"Everybody practices religion in a different way. To me, I would not be here tonight, I would not be running for president of the United States, if I did not have very strong religious and spiritual feelings," said Sanders, who, if elected, would be the first Jewish U.S. president.

"My spirituality is that we are all in this together," Sanders added.

Clinton, a former first lady and former U.S. senator who has spent decades in public life, fielded a question that elicited a similarly spiritual response, speaking of balancing the role of public servant and her sense of self.

RELATED: Sanders says he would reform the Federal Reserve

"I get a scripture lesson every morning from a minister that I have a really close personal relationship with," Clinton said. "He gets up really early to send it to me, so you know, there it is, in my inbox at 5 a.m."

Clinton is seeking to manage expectations about her performance in next week's New Hampshire primary, saying Sanders has an advantage because he is from a neighboring state. But Clinton shows huge polling leads in the next round of primary contests in Nevada and South Carolina.

The results from New Hampshire could shift momentum in the Democratic race. Clinton had hoped for a strong finish against Sanders in Iowa to vanquish his insurgent candidacy. In New Hampshire, she hopes to overcome his polling lead.