Coming just five days ahead of the crucial New York contest Tuesday, the debate featured combative exchanges on issues including gun control, Israel and Wall Street reform. These policy disagreements were fueled by a broader clash: Sanders cast doubt on Clinton's judgment and credibility, while Clinton insisted that the Vermont senator lacked experience and pragmatism.
As the two delivered harsh attacks throughout the night -- on multiple occasions inviting intervention from the moderators -- a rowdy crowd at the Brooklyn Navy Yards stoked the tension, loudly cheering and hissing to take sides.
Thursday's debate and the primary here next week come at a critical juncture in the Democratic contest. Sanders is trying to change the dynamics of a race that has delivered many more delegates to Clinton; the former secretary of state, meanwhile, is on an urgent mission to halt the momentum of her unexpectedly strong challenger.
Sanders came out swinging, accusing his Democratic presidential rival of "lacking the kind of judgment we need to be the kind of president we need." But he found himself on defense for not releasing his taxes and said he would do so on Friday.
Clinton again found herself in the spotlight for her paid speeches to big banks, declining to release the transcripts when pressed by CNN moderators. But she counterpunched by referring to the Vermont senator's trouble explaining some of his core policies in an interview with the New York Daily News.
Attacks on Wall Street
The showdown, held just across the river from Wall Street quickly turned to the issue of the big banks and their perceived excesses.
When asked to name a single policy decision Clinton made as senator that showed she was favoring the banks, Sanders said that when the "greed and recklessness and illegal behavior of Wall Street" led to the financial crisis, he had called on the big banks to be broken up -- while Clinton was "busy giving speeches to Goldman Sachs."
Clinton shot back: "He cannot come up with any example because there is no example ... It's always important -- it may be inconvenient -- but it's always important to get the facts straight."
When Clinton said that she had spoken out against the big banks for the actions, Sanders took a mocking tone.
"Oh my goodness, they must have been really crushed by this," he said, asking whether her statements came before or after "receiving huge sums" from the banks in speaking fees.
Clinton was pressed by co-moderator Dana Bash on why she would not release the transcripts from the speeches she made to Goldman Sachs and put the issue to rest. Clinton answered: "There isn't an issue. When I was in public service serving as the senator from New York, I did stand up to the banks."
Clinton -- as she has in the past -- asked that there be the "same standard for everybody," saying she would be happy to release the transcripts if other presidential candidates, including Donald Trump, did the same.
She then turned the tables on Sanders and his tax returns, saying: "Set the same standard on tax returns. Everybody does it -- and then we move forward."
Sanders, who has come under pressure to release his tax returns, vowed on the debate stage to release his previous year's return on Friday. Returns from earlier years, he said, would also be released "very shortly."
Firing on gun control
The two also displayed intense friction over gun control.
Throughout the campaign, Clinton has criticized Sanders' record in Congress on gun control -- an attack she once again made forcefully on Thursday night. Clinton accused Sanders of having made a "commitment to the NRA" to oppose a waiting period for background checks on gun purchases -- and slammed the senator for voting against the so-called "Brady Bill" five times.
Sanders was forced to address one particularly difficult issue related to guns.
Recently, the daughter of the Sandy Hook Elementary School principal who was killed at the Newtown massacre asked that the senator apologize to the victims for "putting the gun lobby above our families."
Asked whether he would apologize, Sanders punted. Pressed a second time by Wolf Blitzer, Sanders said he did not believe he owed them an apology but that he would support their right to sue gun makers.
While speaking of the crime bill Clinton's husband Bill ushered in as president, Sanders called a term Hillary Clinton had used in the 1990s -- superpredator -- "a racist term." Clinton has since said it was a word she shouldn't have used.
At the debate, Clinton also said she was sorry for the consequences of the crime bill.
After the debate, Sanders said that in retrospect the bill, which he voted for, led to "awful things."
Differences on Israel
The second hour of the debate exposed a major foreign policy disagreement between Clinton and Sanders on the Israeli-Palestinian conflict.
Sanders recently said that Israel's response in the 2014 Gaza war was "disproportionate." On the debate stage, the senator labeled himself "100% pro-Israel" and said that the point of those controversial comments had been to emphasize that Palestinian people must be treated with respect and dignity.
"That does not make me anti-Israel," Sanders said.
Clinton, who used the discussion to highlight the extensive role she played as secretary of state in negotiating a ceasefire between Israel and Hamas in 2012, said Israel is under "constant threat."
"I don't know how you run a country when you are under constant threat. Terrorist attacks, rockets coming at you -- you have a right to defend yourself," she said.
Sanders responded by accusing Clinton of failing to answer the question of whether Israel's response was disproportionate. "You evaded the issue," he said. In a major speech to AIPAC, Sanders said his rival had "barely mentioned the Palestinians."
"We cannot continue to be one-sided," he said.
Clinton, once again, suggested that Sanders likes to point out problems without having a fully thought-out solution to address them.
"Describing a problem is a lot easier than trying to solve it," she said.
Minimum wage debate
The heated debate also exposed tensions on the issue of income inequality -- specifically, raising the minimum wage.
Asked whether she would sign a bill raising the federal minimum wage to $15, Clinton responded: "Of course I would."
That response drew this skeptical reaction from Sanders: "I am sure a lot of people are very surprised to learn that you support raising the minimum wage to $15 an hour. That's just not accurate."
In one of the most animated exchanges of the evening, the two candidates began to talk over each other, eventually prompting moderator Blitzer to intervene.
"If you're both screaming at each other, the viewers won't be able to hear either of you," Blitzer said.
On environmental issues, their differences highlighted a fundamental contrast between the pair's approaches: Clinton's calls for pragmatism and Sanders' calls for a political revolution.
Clinton lauded the global climate change pact reached in Paris, calling it a "major accomplishment."
"Our president led that effort to protect our world and he deserves our appreciation, not our criticism," Clinton said.
But Sanders argued that while the agreement was a "step forward," it wasn't enough.
"Incrementalism and those little steps are not enough," he said, before accusing Clinton of having supported fracking technology -- a drilling technique that has created a major boom in oil and natural gas but raised environmental concerns -- around the world as secretary of state.
Clinton responded that she was "bewildered" by Sanders' remarks.
"It's easy to diagnose the problem. It's harder to do something about the problem."
The dramatic debate concluded with Clinton and Sanders each making the same argument: that they are best positioned to defeat Republican front-runner Donald Trump in the November election.
Sanders said that in virtually all of the general election matchup polls pitting each of the Democrats against Trump, Sanders fared better than Clinton.
His opponent responded with numbers.
"I have gotten more votes than anybody running," she said, "2.3 million more than Sen. Sanders. And it is 1.4 million more than Donald Trump."
The location of the debate, across the East River from Manhattan, made it a home-turf battle for both candidates.
Clinton served as a New York senator for eight years and Brooklyn is the location of her campaign headquarters, while Sanders was born and raised in the borough.
In her opening statement, Clinton began with an oblique attack on the GOP, defending the "New York values" that Republican presidential candidate Ted Cruz, a Texas senator, has used as a pejorative.
Speaking of her days representing the state in the Senate, she said, "We worked hard to really keep New York values at the center of what we are and what we do together."
Polls show Clinton is likely to defeat Sanders in New York
, and even as she enjoys a sizable delegate lead, it is critical for Clinton that she win this state.
The Democratic race so far has proven Sanders to be an unexpectedly durable candidate whose popularity among liberals and younger voters has helped to expose the vulnerabilities in Clinton's candidacy.
The New York race comes after a string of victories for Sanders, including Wyoming, Wisconsin, Idaho and Utah. If Sanders were to eke out a win in New York, it would deal a serious blow to Clinton and strengthen the narrative that it is taking Clinton much longer than initially expected to clinch her party's nomination.