Brooklyn brawler Bernie Sanders took the gloves off and pummeled Hillary Clinton in his home borough, leaving the former secretary of state on the ropes several times during last night’s debate days ahead of the high-stakes New York primary.

New York-born Sanders laid into Clinton on issue after issue — her judgment, her vote to invade Iraq, her ties to Wall Street, her support of trade deals and her shifting stance on the minimum wage. Sanders stayed on message as Clinton tried to duck or divert him onto her own ground.

At the end, Clinton had to wait several seconds to begin her closing statements as the crowd — which had booed her twice — chanted “BERNIE!”

“History has outpaced Secretary Clinton,” the Vermont U.S. senator said of hiking the minimum wage, “because all across this country people are standing up and saying, ‘$12 isn’t good enough. We need $15 an hour.’ And suddenly you’ve announced you’re for 15.”

“I’ve said from the very beginning that I’ve supported the fight for $15,” said Clinton — drawing boos from the crowd.

Sanders also dismissed Clinton’s claim that she stood up to big banks.

“Oh my goodness,” Sanders said. “They must have been really crushed by this. Was this before or after you received large sums of money by giving speaking engagements?”

Sanders backed away from his recent comments that Clinton is unqualified to be president, but still insisted she lacks judgment based on her vote to invade Iraq, “disastrous” trade agreements and super PACs fueled by Wall Street donations.

“I don’t believe that it’s the type of judgment we need to be the kind of president we need,” Sanders said of Clinton.

He also hit Clinton’s judgment for the decision to intervene in Libya.

Clinton countered that New York voters endorsed her judgment when they twice elected her to the Senate, as President Obama did when he appointed her secretary of state.

She also blasted Sanders over his recent New York Daily News interview.

“When asked about a number of foreign policy issues, he could not answer about Afghanistan, about Israel, about counterterrorism, except to say that maybe if he had a paper in front of him he would,” said Clinton.

Clinton once again refused to release transcripts of her speeches to Goldman Sachs, unless all other candidates did.

Sanders joked he’d release all of his Wall Street speeches — but that there are none. After Clinton pressed him to release his income taxes, Sanders said he’d release his 2014 returns today, but that they are “boring” and that his wife, Jane, prepares them.

Tuesday’s Empire State primary is crucial for both candidates. Clinton, up in the polls there, is looking to make a brand new start of it in old New York after losing seven of the last eight early nominating contests. Sanders’ campaign believes if he can make it there, he’ll make it anywhere — that a New York win would be a shocking game-changer that could tilt the balance in ?future states.

Some 291 delegates — 44 of them establishment superdelegates — are up for grabs, giving a dominant winner huge momentum moving forward.