Photo: Senator Bernie Sanders at Thursday night’s Democratic debate in Brooklyn. In response to a question about Israel, Mr. Sanders said that Prime Minister Benjamin Netanyahu “is not right all of the time.” Credit Chang W. Lee/The New York Times

It was the sort of question — Does Israel have a right to defend itself as it sees fit? — that had often caused candidates, especially those with designs on winning a primary in New York, to produce paeans to the strength of the Israeli-American relationship and a stream of pro-Israel orthodoxy.

But Senator Bernie Sanders dug in.

“There comes a time when if we pursue justice and peace, we are going to have to say that Netanyahu is not right all of the time,” Mr. Sanders said, referring to the Israeli prime minister, amid cheers from the crowd at Thursday’s Democratic debate in Brooklyn. He added: “All that I am saying is we cannot continue to be one-sided. There are two sides to the issue.”

Jewish Democrats, like the rest of the party, have been struggling for years over the appropriate level of criticism when it comes to Israel’s policies in the occupied West Bank and Gaza. But that debate burst onto a big national stage this week thanks to Mr. Sanders, the most successful Jewish presidential candidate in history.

Mr. Sanders’s comments, in the de facto capital of Jewish American politics, buoyed the liberal and increasingly vocal Democrats who believe that a frank discussion within the party has been muzzled by an older, more conservative Jewish leadership that is suspicious of criticism of Israel.

Jeremy Ben-Ami, the president of J Street, a progressive pro-Israel lobbying group whose more critical view of the Israeli government has gained influence on Capitol Hill, said Mr. Sanders’s comments were “very different from the stale talking points that have dominated those types of discussions before” and contributed to a “meaningful redefinition of what it means to be pro-Israel.”

But the comments, as measured as they were striking, worried more traditionally pro-Israel Jewish Democrats and Jewish organizations trying desperately to maintain bipartisan support for the Israeli government but watching it slowly being chipped away.

“I thought that Bernie Sanders’s comments were disgraceful and reprehensible, and I thought he was just over the top,” said Eliot Engel, a Jewish congressman from the Bronx who supports Hillary Clinton. He said that Mr. Sanders’s comments were irresponsible, giving radical left-wing elements in the party more license to attack Israel.

“Maybe he feels like he has to bend over backwards because he’s Jewish?” Mr. Engel said, adding, “It bothers me a great deal.”

Even before the debate, unease over Israeli policies within the Democratic Party was rising.

At the 2012 Democratic National Convention, delegates lustily booed officials who reinstated in the party platform a recognition of Jerusalem as the capital of Israel, at odds with the United States’ official position that the city’s status must be negotiated between Israelis and Palestinians.

Protesting Israel’s policies and advocating boycotts to pressure its government are practically electives for liberal college students furious about the growth of Israeli settlements in the West Bank. In Washington, relations between President Obama and Prime Minister Benjamin Netanyahu are acrid, and last year more than 50 members of the Democratic caucus boycotted Mr. Netanyahu’s speech to Congress in which he criticized Mr. Obama’s nuclear deal with Iran.

Mr. Sanders’s response on Thursday was to a question about his past statement that Israel had used disproportionate force in responding to Hamas’s rocket attacks from Gaza into Israeli towns. One of the moderators, Wolf Blitzer of CNN, asked whether Israel had a right to defend itself.

Mr. Sanders said Israel had “every right in the world to destroy terrorism.”

“But,” he said, “we had in the Gaza area — not a very large area — some 10,000 civilians who were wounded and some 1,500 who were killed.”

The applause and cheers that accompanied Mr. Sanders’s answers — someone yelled “Free Palestine!” — might have been the most vocal signs yet of shifts in the Democratic Party.

A Pew Research Center poll in 2014 about violence in Gaza found that Americans under 30 were more likely to blame Israel than to blame Hamas, though half blamed both or did not have an opinion. African-Americans and Hispanics also blamed Israel more often than Hamas.

Those surveyed who were over 30 found Hamas more responsible, and the older the respondents were, the less they blamed Israel.

“The roar in the crowd was telling,” said Peter Beinart, a leading voice in the liberal Zionist movement.

“A Democratic Party dominated by progressive millennials, African-Americans and Latinos will gradually defect more and more from the Aipac-Bibi line,” he added, referring to the American Israel Public Affairs Committee and to Mr. Netanyahu by his nickname.

“Those aren’t their values,” Mr. Beinart continued. “What Bernie said last night, and the crowd’s response, were a sign of things to come.”

Younger Jews’ waning support for Israel in its dealings with Palestinians may not be so surprising. Unlike their parents and grandparents, who grew up when Jews were still reeling from the Holocaust, they know Israel primarily as a powerful nation rather than an existential necessity.

Andy Bachman, a prominent Brooklyn progressive rabbi, said the energetic applause at Mr. Sanders’s criticism of Israel “spoke to this growing rift in the Democratic Party — it was proof of a major crisis in the Jewish community that no major Jewish organization has resolved or figured out to handle.”

Mr. Sanders, who is not observant, has spoken at times about family members killed in the Holocaust, and he spent time in an Israeli kibbutz after college. But he has had some stumbles related to his views on Israel. His hiring of a young activist leader, Simone Zimmerman, as his Jewish outreach director turned out to be a rare blunder for his campaign when Facebook posts turned up in which she referred to Mr. Netanyahu with a vulgarity. She was suspended a few hours before the debate.

Supporters of Mrs. Clinton raised concerns about the substance of Mr. Sanders’s statements, arguing that he showed his haphazardness on the issue in a recent Daily News interview in which he greatly exaggerated the number of civilians killed in Gaza, saying more than 10,000 had died. Clinton supporters also said he had supplied no specifics when he called for an “evenhanded” approach.

In Mrs. Clinton’s response to the same question Thursday night, she stopped short of endorsing Israel’s response but echoed its argument that Hamas fighters were often mixed in with civilians. She noted her experience dealing with both sides as secretary of state and said — to applause — “I believe that as president I will be able to continue to make progress and get an agreement that will be fair both to the Israelis and the Palestinians without ever, ever undermining Israel’s security.”

Mr. Engel, the congressman, said he took solace in the fact that Mrs. Clinton still had a large delegate lead.

“I don’t have a fear because he’s not going to be the nominee,” Mr. Engel said of Mr. Sanders. “Hillary is going to be the nominee, and she’s just fine.”

Still, Jewish activists who are highly critical of Israel said they would be thankful for his contribution even if he did not win.

Minutes after the debate, Rebecca Vilkomerson, the executive director of Jewish Voice for Peace, a growing grass-roots organization that advocates pressuring Israel with the threat of boycotts, released a statement calling Mr. Sanders’s remarks “heartening” and added, “Today showed that the movement for Palestinian rights is shifting the discourse at the highest political levels.”