The New York City debate between former Secretary of State Hillary Clinton and Vermont Senator Bernie Sanders started off with a bang, as both vied for votes in a state with one of the largest number of Democratic delegates in the country.

The debate was held at Brooklyn Navy Yard, in a discussion moderated by CNN’s Wolf Blitzer and featuring questions from his colleague Dana Bash and NY1’s Errol Louis . 

Blitzer opened the debate by asking Sanders about comments he made at a rally earlier this week in which he charged Clinton was “not qualified” to be President.

“Of course” she’s qualified, Sanders said, adding “I said that in response to the kinds of attacks we were getting from the Clinton campaign.” 

“But I do question her judgment,” he continued. She "voted for the war in Iraq, the worst foreign policy blunder in the history of this country, voted for nearly every disastrous trade agreement...and I question her judgment, about wanting SuperPACs, which are collecting tens of millions of dollars from special interests -- including $15 million from Wall Street. I don’t believe that is the kind of judgment we need, to be the kind of president we need.”

RELATED: Not an endorsement, but close; Obama comments hint at support for Clinton

“The people of New York voted for me twice to be the senator of New York,” Clinton replied, to cheers. “And President Obama trusted my judgment enough to be Secretary of State of the United States.

“If you go and read Senator Sanders long interview with the New York Daily News -- talk about judgment, and the kinds of problems he had answering questions about even his core issue: breaking up the banks,” she added, prompting a laugh from Sanders. “When asked about a number of foreign policy issues, he could not answer -- about Afghanistan, Israel, counter-terrorism.” 

Sanders countered that Clinton voted for the War in Iraq while he “lead the opposition to that war.” 

“Do we really feel confident about a candidate saying she’s going to bring change in America, when she is so dependent on big money interests?” the senator from Vermont asked.

The debate, which ranged from bank regulations to gun violence, comes only five days before the state’s Tuesday primary, where 247 delegates are at play, not including 44 superdelegates.  

Most polls indicate that if current trends continue, Sanders will be unable to secure enough delegates to win the nomination, but that has not stopped the senator from mounting an intense campaign, especially in New York City where he has held almost daily rallies or appearances.

RELATED: Hillary Clinton says no floor fight despite Sanders wins

Wednesday night, Sanders spoke before a crowd of 25 to 30,000 people in Washington Square Park, while Clinton held a rally in the Bronx with Borough President Ruben Diaz Jr. 

Both are also smarting from some gaffes that emerged on the campaign trail this month. Clinton, who participated in a scripted, racially-charged joke with Mayor Bill de Blasio this week, blamed his office for the problematic joke. Her husband and former President Bill Clinton also said he “almost want[ed] to apologize” for the way he engaged Black Lives Matter protesters during a campaign stop this month.

Sanders also condemned remarks by supporter and health care activist Dr. Paul Song, who referred to “Democratic whores” beholden to special interests during his introductory speech in Washington Square Park Wednesday night.