Hillary Clinton and Bernie Sanders took their battle for president to a Brooklyn stage Thursday night.

In a series of fierce exchanges across a two-hour debate, they questioned each other's qualifications, and battled over issues from gun control to climate change.

The Vermont senator said Clinton has not showed the “the kind of judgment we need” in a president, and Clinton suggested Sanders was not ready to be President on “day one.”

The debate, co-sponsored by NY1 and CNN and staged at the Brooklyn Navy Yard, was held five days before Democrats vote in the crucial New York primary on April 19. NY1 political anchor Errol Louis was one of the panelists.

The stakes were high – Sanders is trying to build on momentum from a string of state caucus wins, while Clinton is seeking a haul of delegates in her adopted home state that would realistically put the nomination out of Sanders' reach.

Their ninth and perhaps final debate seemed to reflect that urgency. The two Democrats began tangling from the opening question, in which Sanders was asked whether he stood by his comments last week that Clinton, a former U.S. senator and secretary of state, was not qualified to be president.

“Does she have the experience and intelligence to be president? Of course she does,” Sanders said. “But I do question her judgment.” He singled out Clinton’s vote as a senator authorizing the war in Iraq, her support of free trade agreements, and her giving speeches to Wall Street banks at $250,000 a pop. 

“I don’t believe that that is the kind of judgment we need to be the kind of president we need,” he said. “Do we really feel confident about a candidate who says she is going to bring change to America when she is so dependent on big money interests?”

“The people of New York voted for me twice to be their senator…and President Obama trusted my judgment to be secretary of state,” Clinton fired back. She said Barack Obama took contributions from Wall Street when he ran for president and he still pushed through sweeping reforms.

“This is a phony attack,” she said, “that is designed to raise questions when there is no evidence to undergird the insinuations he is putting forward.” Clinton said she supported the Dodd-Frank Wall Street reform act, “called out” Wall Street for its excesses, and “was willing to speak out against some of the privileges they had.”

“Secretary Clinton called them out. Oh my God - they must have been crushed by this,” Sanders said with sarcasm. “Was this before or after they gave you huge sums of money?”

She fought back, seizing on the Vermont senator's difficulty explaining his positions in an interview with the New York Daily News editorial board. "Breaking up the banks - he could not explain how that would be done,” Clinton said. “When asked about a number of foreign policy issues, he could not answer."

That brought cheers from her supporters – one of the many outbursts from the rowdy crowd that interrupted the candidates when they were not interrupting each other, giving the debate a distinctly New York flavor.

The issue of gun control brought out another sharp exchange. Clinton lit into Sanders for voting to protect gun makers from lawsuits brought by victims of gun violence, which she called the top priority of the National Rifle Association. 

“This is the only industry in America, the only one, that has this kind of special protection,” Clinton said. “We hear a lot from Sen. Sanders about greed and Wall Street…but what about the greed and recklessness of the gun manufacturers and dealers in America?”

“We need to make certain that we do everything we can to make sure guns do not fall in the hands of people who do not need them,” Sanders said. He said he supported the legislation to protect gun shop owners who do nothing wrong in legally selling a weapon that ends up being used in a crime.

In what might be a first for a Democratic debate in New York, if not nationally, Sanders stressed the rights of the Palestinians, saying the U.S. needs to have a more balanced approached in the Middle East.  

He stood by his previous comments that Israel’s response to rocket attacks by Hamas in the 2014 Gaza war were “disproportionate and led to the unnecessary loss of innocent life.”

”Of course Israel has a right not only to defend itself but also live in peace,” Sanders said. But, “was their response disproportionate? I believe that it was.” He added, in a reference to Israel’s prime minister, “There comes a time, when if we pursue justice and peace, we are going to have to say, ‘Netanyahu is not right all of the time.’”

Clinton repeatedly sidestepped whether she thought Israel acted disproportionately, although she expressed sympathy with Israel. “It is a difficult position…trying to seek peace…when there is a terrorist group embedded in Gaza that does not want to see you exist,” she said.

At several points, the debate highlighted a contrast between the two Democrats on how they approach problems. Sanders portrayed Clinton as a compromiser on issues like climate change, when, he said, bold action is needed.

“This is a different between understanding we have a crisis of historical consequence here, and incrementalism, and little steps, that are not enough,” he said.

Clinton said enacting change is difficult given fierce Republican opposition in Congress. She portrayed Sanders as a big talker who accomplishes little. “I don’t take a back seat to your legislation that you’ve introduced that you haven’t been able to get passed,” she said.

With New York Democrats preparing to vote, both played up connections to the state. Sanders was born in the city; Clinton was a senator from the state for eight years.

“I love being in Brooklyn. This is great,” she said.

“I grew up in Brooklyn, New York, the son of immigrants,” he said.

Their love of New York was a rare point of agreement, in a race that has taken a combative turn.