New York City (CNN) Hillary Clinton and Bernie Sanders squared off Thursday night in the most heated and dramatic Democratic presidential debate of the 2016 cycle. The rivals battled it out at a two-hour prime-time event on CNN that exposed fundamental differences in their candidacies and campaign styles.

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.

The first and last Democratic debates were totally different

The first and last Democratic debates were totally different 01:34

The first and last Democratic debates were totally different

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.

Photos: Hillary Clinton's life in the spotlight Hillary Clinton accepts the Democratic Party's nomination for president at the Democratic National Convention in Philadelphia on July 28, 2016. The former first lady, U.S. senator and secretary of state was the first woman to lead the presidential ticket of a major political party. Hide Caption 1 of 43 Photos: Hillary Clinton's life in the spotlight Before marrying Bill Clinton, she was Hillary Rodham. Here she attends Wellesley College in Massachusetts. Her commencement speech at Wellesley's graduation ceremony in 1969 attracted national attention. After graduating, she attended Yale Law School. Hide Caption 2 of 43 Photos: Hillary Clinton's life in the spotlight Rodham was a lawyer on the House Judiciary Committee, whose work led to impeachment charges against President Richard Nixon in 1974. Hide Caption 3 of 43 Photos: Hillary Clinton's life in the spotlight In 1975, Rodham married Bill Clinton, whom she met at Yale Law School. He became the governor of Arkansas in 1978. In 1980, the couple had a daughter, Chelsea. Hide Caption 4 of 43 Photos: Hillary Clinton's life in the spotlight Arkansas' first lady, now using the name Hillary Rodham Clinton, wears her inaugural ball gown in 1985. Hide Caption 5 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons celebrate Bill's inauguration in Little Rock, Arkansas, in 1991. He was governor from 1983 to 1992, when he was elected President. Hide Caption 6 of 43 Photos: Hillary Clinton's life in the spotlight Bill Clinton comforts his wife on the set of "60 Minutes" after a stage light broke loose from the ceiling and knocked her down in January 1992. Hide Caption 7 of 43 Photos: Hillary Clinton's life in the spotlight In June 1992, Clinton uses a sewing machine designed to eliminate back and wrist strain. She had just given a speech at a convention of the International Ladies' Garment Workers Union. Hide Caption 8 of 43 Photos: Hillary Clinton's life in the spotlight During the 1992 presidential campaign, Clinton jokes with her husband's running mate, Al Gore, and Gore's wife, Tipper, aboard a campaign bus. Hide Caption 9 of 43 Photos: Hillary Clinton's life in the spotlight Clinton accompanies her husband as he takes the oath of office in January 1993. Hide Caption 10 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons share a laugh on Capitol Hill in 1993. Hide Caption 11 of 43 Photos: Hillary Clinton's life in the spotlight Clinton unveils the renovated Blue Room of the White House in 1995. Hide Caption 12 of 43 Photos: Hillary Clinton's life in the spotlight Clinton waves to the media in January 1996 as she arrives for an appearance before a grand jury in Washington. The first lady was subpoenaed to testify as a witness in the investigation of the Whitewater land deal in Arkansas. The Clintons' business investment was investigated, but ultimately they were cleared of any wrongdoing. Hide Caption 13 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons hug as Bill is sworn in for a second term as President. Hide Caption 14 of 43 Photos: Hillary Clinton's life in the spotlight The first lady holds up a Grammy Award, which she won for her audiobook "It Takes a Village" in 1997. Hide Caption 15 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons dance on a beach in the U.S. Virgin Islands in January 1998. Later that month, Bill Clinton was accused of having a sexual relationship with former White House intern Monica Lewinsky. Hide Caption 16 of 43 Photos: Hillary Clinton's life in the spotlight Clinton looks on as her husband discusses the Monica Lewinsky scandal in the Roosevelt Room of the White House on January 26, 1998. Clinton declared, "I did not have sexual relations with that woman." In August of that year, Clinton testified before a grand jury and admitted to having "inappropriate intimate contact" with Lewinsky, but he said it did not constitute sexual relations because they had not had intercourse. He was impeached in December on charges of perjury and obstruction of justice. Hide Caption 17 of 43 Photos: Hillary Clinton's life in the spotlight The first family walks with their dog, Buddy, as they leave the White House for a vacation in August 1998. Hide Caption 18 of 43 Photos: Hillary Clinton's life in the spotlight President Clinton makes a statement at the White House in December 1998, thanking members of Congress who voted against his impeachment. The Senate trial ended with an acquittal in February 1999. Hide Caption 19 of 43 Photos: Hillary Clinton's life in the spotlight Clinton announces in February 2000 that she will seek the U.S. Senate seat in New York. She was elected later that year. Hide Caption 20 of 43 Photos: Hillary Clinton's life in the spotlight Clinton makes her first appearance on the Senate Environment and Natural Resources Committee. Hide Caption 21 of 43 Photos: Hillary Clinton's life in the spotlight Sen. Clinton comforts Maren Sarkarat, a woman who lost her husband in the September 11 terrorist attacks, during a ground-zero memorial in October 2001. Hide Caption 22 of 43 Photos: Hillary Clinton's life in the spotlight Clinton holds up her book "Living History" before a signing in Auburn Hills, Michigan, in 2003. Hide Caption 23 of 43 Photos: Hillary Clinton's life in the spotlight Clinton and another presidential hopeful, U.S. Sen. Barack Obama, applaud at the start of a Democratic debate in 2007. Hide Caption 24 of 43 Photos: Hillary Clinton's life in the spotlight Obama and Clinton talk on the plane on their way to a rally in Unity, New Hampshire, in June 2008. She had recently ended her presidential campaign and endorsed Obama. Hide Caption 25 of 43 Photos: Hillary Clinton's life in the spotlight Obama is flanked by Clinton and Vice President-elect Joe Biden at a news conference in Chicago in December 2008. He had designated Clinton to be his secretary of state. Hide Caption 26 of 43 Photos: Hillary Clinton's life in the spotlight Clinton, as secretary of state, greets Russian Prime Minister Vladimir Putin during a meeting just outside Moscow in March 2010. Hide Caption 27 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons pose on the day of Chelsea's wedding to Marc Mezvinsky in July 2010. Hide Caption 28 of 43 Photos: Hillary Clinton's life in the spotlight In this photo provided by the White House, Obama, Clinton, Biden and other members of the national security team receive an update on the mission against Osama bin Laden in May 2011. Hide Caption 29 of 43 Photos: Hillary Clinton's life in the spotlight Clinton checks her Blackberry inside a military plane after leaving Malta in October 2011. In 2015, The New York Times reported that Clinton exclusively used a personal email account during her time as secretary of state. The account, fed through its own server, raises security and preservation concerns. Clinton later said she used a private domain out of "convenience," but admits in retrospect "it would have been better" to use multiple emails. Hide Caption 30 of 43 Photos: Hillary Clinton's life in the spotlight Clinton arrives for a group photo before a forum with the Gulf Cooperation Council in March 2012. The forum was held in Riyadh, Saudi Arabia. Hide Caption 31 of 43 Photos: Hillary Clinton's life in the spotlight Obama and Clinton bow during the transfer-of-remains ceremony marking the return of four Americans, including U.S. Ambassador Christopher Stevens, who were killed in Benghazi, Libya, in September 2012. Hide Caption 32 of 43 Photos: Hillary Clinton's life in the spotlight Clinton ducks after a woman threw a shoe at her while she was delivering remarks at a recycling trade conference in Las Vegas in 2014. Hide Caption 33 of 43 Photos: Hillary Clinton's life in the spotlight Clinton, now running for President again, performs with Jimmy Fallon during a "Tonight Show" skit in September 2015. Hide Caption 34 of 43 Photos: Hillary Clinton's life in the spotlight Clinton testifies about the Benghazi attack during a House committee meeting in October 2015. "I would imagine I have thought more about what happened than all of you put together," she said during the 11-hour hearing. "I have lost more sleep than all of you put together. I have been wracking my brain about what more could have been done or should have been done." Months earlier, Clinton had acknowledged a "systemic breakdown" as cited by an Accountability Review Board, and she said that her department was taking additional steps to increase security at U.S. diplomatic facilities. Hide Caption 35 of 43 Photos: Hillary Clinton's life in the spotlight U.S. Sen. Bernie Sanders shares a lighthearted moment with Clinton during a Democratic presidential debate in October 2015. It came after Sanders gave his take on the Clinton email scandal. "The American people are sick and tired of hearing about the damn emails," Sanders said. "Enough of the emails. Let's talk about the real issues facing the United States of America." Hide Caption 36 of 43 Photos: Hillary Clinton's life in the spotlight Clinton is reflected in a teleprompter during a campaign rally in Alexandria, Virginia, in October 2015. Hide Caption 37 of 43 Photos: Hillary Clinton's life in the spotlight Clinton walks on her stage with her family after winning the New York primary in April. Hide Caption 38 of 43 Photos: Hillary Clinton's life in the spotlight After Clinton became the Democratic Party's presumptive nominee, this photo was posted to her official Twitter account. "To every little girl who dreams big: Yes, you can be anything you want -- even president," Clinton said. "Tonight is for you." Hide Caption 39 of 43 Photos: Hillary Clinton's life in the spotlight Obama hugs Clinton after he gave a speech at the Democratic National Convention in Philadelphia. The president said Clinton was ready to be commander in chief. "For four years, I had a front-row seat to her intelligence, her judgment and her discipline," he said, referring to her stint as his secretary of state. Hide Caption 40 of 43 Photos: Hillary Clinton's life in the spotlight Clinton arrives at a 9/11 commemoration ceremony in New York on September 11. Clinton, who was diagnosed with pneumonia two days before, left early after feeling ill. A video appeared to show her stumble as Secret Service agents helped her into a van. Hide Caption 41 of 43 Photos: Hillary Clinton's life in the spotlight Clinton addresses a campaign rally in Cleveland on November 6, two days before Election Day. She went on to lose Ohio -- and the election -- to her Republican opponent, Donald Trump. Hide Caption 42 of 43 Photos: Hillary Clinton's life in the spotlight After conceding the presidency to Trump in a phone call earlier, Clinton addresses supporters and campaign workers in New York on Wednesday, November 9. Her defeat marked a stunning end to a campaign that appeared poised to make her the first woman elected US president. Hide Caption 43 of 43

"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.

JUST WATCHED The Brooklyn Democratic debate in 90 seconds Replay More Videos ... MUST WATCH The Brooklyn Democratic debate in 90 seconds 01:31

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.

JUST WATCHED Hillary Clinton apologizes for husband's crime bill Replay More Videos ... MUST WATCH Hillary Clinton apologizes for husband's crime bill 01:12

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.