Hillary Clinton and Bernie Sanders shelved the niceties and went right after each other’s perceived weak spots at a must-win Democratic primary debate Thursday night where the front-runner challenged her rival’s grasp of complex policy issues – and the insurgent senator hammered her as a Wall Street pal just now talking the talk of working Americans.

The charge crystallized when Clinton seemed to surprise Sanders by declaring she’d back legislation for a $15 federal minimum wage.

“To suddenly announce now you’re for 15, I don’t think is quite accurate,” Sanders said, noting Clinton previously has pushed for increasing the hourly wage to $12. “I think the secretary has confused a lot of people.”

However, Clinton said while she supports the goal of raising the wage to $12, she would sign legislation raising it to $15 if a Democratic Congress passes it.

“I have said from the very beginning that I supported the fight for 15,” Clinton insisted.

The heated dispute, in which the candidates frequently interrupted each other, was one of many at a CNN-hosted debate heavy on populist rhetoric – and personal attacks.

Sanders at one point went as far as to suggest Clinton’s labeling of certain criminals as "superpredators" when she was first lady was "a racist term and everybody knew it was a racist term."

The two faced off in Brooklyn, for their first debate in more than a month, at a critical time. The campaign heads soon into the final stretch with the upcoming New York primary seen as a determining factor. While Sanders trails badly in delegates, he is pointing to his recent winning streak in insisting he can still “win this nomination.”

“Secretary Clinton cleaned our clock in the deep South. We got murdered there,” he conceded, before adding. “We’re out of the deep South now.”

“I’m not taking anything for granted, or any voter or any place,” Clinton said, while noting she’s gotten millions more votes and saying the party will eventually have to unite.

Eyeing the contest ahead, both candidates courted Empire State voters Thursday by stressing their New York ties – and more broadly, hitting working-class themes.

At the same time, the debate veered heavily into foreign policy in the second half, with Sanders using the issue to challenge Clinton’s judgment while she questioned his experience.

“Describing the problem is a lot easier than trying to solve it,” Clinton said at one point, challenging Sanders as he laid out his goals for achieving Middle East peace.

Sanders also took heat from Clinton for describing Israeli military action as at times disproportionate. “They do not invite rockets raining down on their towns and villages,” she said. Sanders said Israel has a right to defend itself, but the U.S. needs to be even-handed in peace talks.

Sanders, as he has before, hammered Clinton for supporting regime change in Libya and Iraq, warning that it has “unintended consequences.” He said the former secretary of state’s continued support for a no-fly zone in Syria – which he noted President Obama does not support – “runs the risk of getting us sucked into perpetual warfare in that region.”

But Clinton defended her stance, and argued: “Nobody stood up to Assad and removed him and we have had a far greater disaster in Syria.”

Earlier, Sanders also pointed to Clinton’s support for the Iraq war, as well as “virtually every disastrous trade agreement,” in challenging her “judgment” to lead.

However, Clinton fired back, pointing to an editorial board meeting Sanders had with the New York Daily News where he seemed to struggle to explain his plan to break up the banks and various foreign policy positions.

“He could not explain how” he would break up the banks, Clinton said. She defended her own judgment and said: “I think you need to have the judgment on day one to be both president and commander-in-chief.”

While the tone was tougher than past face-offs, the candidates hit several familiar themes. Clinton suggested Sanders is too closely aligned with the gun industry. Sanders knocked Clinton for not releasing transcripts of her past paid speeches (while saying he would soon release a new batch of tax returns).

On that point, Sanders said that despite the financial industry-fueled recession, “Secretary Clinton was busy giving speeches to Goldman Sachs for $225,000 a speech.”

Clinton, though, denied that any of that money influenced her decisions in office. Further, she said, “I stood up against behaviors of the banks when I was a senator.”

Sanders gave a sarcastic retort: “Oh my goodness. They must have been really crushed by this.”

As he did on the minimum wage, Sanders also seemed to accuse Clinton of shifting her position when it came to Social Security taxes, though Clinton again claimed she’s been consistent.

Sanders has been on an election roll lately, winning seven of the last eight state contests, most recently in Wyoming over the weekend. On stage Thursday, he touted his “landslide victories” in recent contests.

But analysts note the primary map could soon be turning back in the front-runner’s favor, not only in New York but other Eastern primary states.

With the stakes getting ever-higher, the tone of the contest had sharpened well before Thursday’s debate. Sanders recently alleged Clinton may not be qualified for president, before walking back the remark. And the Clinton campaign has criticized Sanders for the aggressive efforts by some of his supporters to persuade so-called superdelegates to back the Vermont senator.

Superdelegates are elected officials and other party insiders free to support whomever they want. Most of them are siding with Clinton, giving her an even wider delegate lead. But Clinton noted Thursday night that she holds the pledged delegate lead as well.

Going into the Empire State primary on Tuesday, Clinton so far has held the lead in most polls. Clinton spent eight years as a New York senator.

But Sanders, a Vermont senator who was born in Brooklyn, has been touting his local roots as he seeks to upset Clinton in the state.

While Sanders is on a winning streak in primaries and caucuses, he desperately needs a big victory in New York if he hopes to cut into Clinton's delegate lead and slow her march to the nomination. To date, Clinton has accumulated 1,758 total delegates, compared with Sanders’ 1,069. It takes 2,383 to win.

The Associated Press contributed to this report.