DURHAM, N.H. -- In their first head-to-head debate, Hillary Clinton and Sen. Bernie Sanders (I-Vt.) made it clear that any lingering pleasantries from a happier time earlier in the campaign are vanishing quickly.

The two engaged in their most heated exchanges to date over issues like international diplomacy, the death penalty and the ethical backbones of the campaigns they're running. But the central argument was over the core issue of the primary election: what it means to be progressive.

It was substantive but also acrimonious. And with Sanders showing incredible staying power in a race many thought would easily be Clinton's -- news broke before the debate that he'd out-raised Clinton in January -- it foreshadowed some testy months to come.

The tensions at Thursday night's debate at the University of New Hampshire weren't entirely new. In the days since Clinton eked out a close win in the Iowa caucuses, the candidates have bickered over what, exactly, it means to be a "progressive," with the former secretary of state on the defensive over her vote for the Iraq War, her evolution on same-sex marriage and her ties to Wall Street.

It's a fight that has been simmering in the party far longer, as Democrats moved away from the tarnished term "liberal" and began embracing the alternative characterization that they weren't always able to properly define.

Clinton has honed her responses in the last few days on the trail, and Thursday was one of her sharpest debate performances yet, in which she accused Sanders of having unrealistic litmus tests that would exclude virtually everyone -- President Barack Obama included -- from being deemed ideologically pure.

"A progressive is someone who makes progress. That's what I intend to do," Clinton said.

"Under his definition, President Obama is not progressive because he took donations from Wall Street; Vice President Biden is not progressive because he supported Keystone; [Sen. Jeanne Shaheen (D-N.H.)] is not progressive because she supports the trade pact," she added. "Even the late, great Sen. Paul Wellstone would not fit this definition because he voted for [the Defense of Marriage Act]."

Clinton then questioned how Sanders could paint her as being a member of the establishment, since if elected, she would be the country's first female president.

"Honestly, Sen. Sanders is the only person who I think would characterize me, a woman running to be the first woman president, as exemplifying the establishment," she said. "And I've got to tell you that it is really quite amusing to me."

Sanders was clearly displeased at the rhetorical jab and let it show in his facial expressions. But these past few months have made him a notably more comfortable and confident candidate. His temper never flared. He still went after her far more aggressively than he has in the past, returning time and again to his larger point: that Clinton's decision to raise money on Wall Street and have an allied super PAC were either crass political choices at best, or potential vehicles of corruption at worst.

"Let's talk about issues, all right? Let's talk about why, in the 1990s, Wall Street got deregulated. Did it have anything to do with the fact that Wall Street provided -- spent billions of dollars on lobbying and campaign contributions?" Sanders declared. "Well, some people might think, yeah, that had some influence."

Jewel Samad/Getty Images Sen. Bernie Sanders (I-Vt.) and former Secretary of State Hillary Clinton debated Thursday night over their stances on the death penalty, Wall Street, foreign policy and a number of other issues.

Clinton wasn't particularly amused. Her campaign aides have complained for days at what they've deemed "hip checks" from Sanders.

"I really don’t think these kinds of attacks by insinuation are worthy of you," Clinton said in response. "If you got something to say, say it directly. But you will never find that I have ever changed a view or a vote because of any donation I’ve received."

It was time, Clinton added, "to end the very artful smear that you and your campaign have been carrying out."

The audience booed that comment.

Tad Devine, Sanders' senior strategist, called Clinton's remark "unfortunate."

"Bernie Sanders, I think, has run a very positive campaign," Devine said after the debate. "Now when he critiques a corrupt system of finance, it's not an attack on Hillary Clinton and no one else. It's an attack on a system ... that is electing officials through super PACs and large campaign contributions. Bernie feels that's what at the heart of what's rigging the economy."

When the debate shifted to foreign policy, the tenor shifted notably as well. Clinton, on firmer footing, showed a level of sophistication in the answers that Sanders lacked. She listed off names of foreign leaders and specific elements of Afghanistan and Iraq policy, while Sanders stuck to broad strokes -- and his tried and true trump card.

“I fully concede that Secretary Clinton ... has more experience. But experience is not the only point. Judgment is,” he explained. “And once again, back in 2002 when we both looked at the same evidence about the wisdom of the war in Iraq, one of us voted the right way and one of us didn’t.”

If there was any indication that the foreign policy section went well for Clinton -- at least in the eyes of her campaign -- it was in the spin room after the debate. Aides to the former secretary of state were aggressively focused on elevating that portion of the evening and portraying Sanders as a naïf on the subject.

“I think if he had a corner man, somebody would have thrown a towel into the ring,” said John Podesta, Clinton's campaign chairman,

“I think it is pretty clear to people who watched that Senator Sanders probably flunked the commander in chief test tonight,” said the campaign’s senior aide and pollster, Joel Benenson.

Sanders aides seemed slightly caught off guard by the assault, though they weren't unprepared to respond. The most direct and on-message pushback came from campaign manager Jeff Weaver, who pivoted back to the vote for the Iraq war authorization and drew lines to current foreign policy matters.

“The question is have you learned the lessons of the Iraq war, right?” said Weaver. “So when you support a no-fly zone in Syria, when you support a very interventionist regime change program in Libya, it is not clear that you’ve learned the lessons of the Iraq war. “

While Weaver largely stuck to script, Devine went off of it. In noting Sanders’ opposition to “endless war“ and having the U.S. shoulder the burden of the world’s crises, he insinuated that Clinton was predisposed to both. Challenged, Devine replied: “Well I don’t know if she does. I think she believes in a very aggressive policy of intervention and that has been demonstrated.”

It was fair, in short, to conclude that the foreign policy section had not been Sanders' best moment of the night.

But, in the end, it was probably passable. The Democratic primary hasn't been waged on foreign policy grounds. And after an extended exchange on the merits and methods of normalizing relations with countries like Iran, and the threats posed by North Korea and Russia, the conversation drifted back to more familiar topics.

This story has been updated to include spin room comments.

Read the latest updates on the debate below: