TEL AVIV, Israel — After a revered ultra-Orthodox rabbi died this week from COVID-19, Israeli police thought they had worked out an arrangement with his followers to allow a small, dignified funeral that would conform with public health guidelines under the current coronavirus lockdown.

But when it was time to bury the rabbi on Monday, thousands of people showed up — ignoring social distancing rules and clashing with police who tried to disperse the mass gathering.

Such violations of lockdown rules by segments of the ultra-Orthodox population have angered a broader Israeli public that is largely complying with the restrictions imposed to halt a raging coronavirus outbreak.

The defiance on display has confounded public health experts, tested Prime Minister Benjamin Netanyahu's longstanding political alliance with religious leaders and triggered a new wave of resentment from secular Israelis who fear for their health and livelihoods.

"We've been asked to go into this lockdown, with its insane economic cost, that is causing people to go insane, because of the increase in coronavirus which is mostly occurring in the ultra-Orthodox sector and in large part because of criminal negligence," wrote media personality Judy Shalom Nir Mozes on the Ynet news site. "There are two sets of laws here. One for us and one for them."

The ultra-Orthodox claim they are being unfairly targeted by they authorities. They point to large weekly protests, mainly by secular Israelis, against Netanyahu's handling of the pandemic that have continued throughout the summer. Only last week, the government finally placed limits on the size of the protests, citing violations of public health guidelines.

"We are at the closest point to an explosion in terms of the mistrust," said Israel Cohen, a commentator with the ultra-Orthodox radio station Kol Barama.

A deep chasm has long divided religious and secular Israelis, wrought by years of seemingly preferential treatment for the ultra-Orthodox who are granted government stipends to study full-time. Ultra-Orthodox support is the lifeblood of Netanyahu's coalition and has helped crown him Israel's longest-serving leader.

Israel, with a population of 9 million, is battling one of the world's worst coronavirus outbreaks on a per capita basis. Its ultra-Orthodox community, which makes up roughly 10% of the population, accounts for over one-third of the country's coronavirus cases.

In the last week, Israel has seen highs of 9,000 new virus cases a day. It has recorded over 272,000 confirmed cases and more than 1,700 deaths from the coronavirus since the beginning of the pandemic.

The current spike comes during the Jewish High Holidays, a time when faithful usually pack synagogues and hold large family gatherings — settings that officials feared would ramp up the country's already soaring infection rates.

Israel imposed a second nationwide lockdown ahead of the Jewish New Year last month, aiming to keep people at home.

But parts of the ultra-Orthodox, or Haredi, community have defied those limits, holding massive holiday events, moving back and forth between cities and keeping some schools and synagogues open despite orders to close down.

Despite appeals by some lawmakers and community leaders for compliance, the current harvest holiday of Sukkot has presented another opportunity to defy the lockdown. After the weeklong holiday began on Friday, Israeli news outlets aired images of packed synagogues.

"It disturbs us," Israel's coronavirus czar Ronni Gamzu said last week of the high morbidity, after revealing the ultra-Orthodox made up 40% of the country's total cases.

The ultra-Orthodox have been at the center of the outbreak since it began in the spring. They tend to live in poor, crowded neighborhoods where sickness can quickly spread. Synagogues, the centerpiece of social life, bring men together to pray and socialize in small spaces.

Large parts of the community are adhering to rules. But some ultra-Orthodox view the restrictions as a greater threat than the virus, fearing the lockdown restrictions will undermine their way of life.

The cloistered community has long been separate from mainstream Israeli life, with children studying scripture but very little math and English. Men are granted exemptions from military service, which is compulsory for other Jews, and some avoid the workforce while collecting welfare stipends to continue to study full time.

The community's representatives in parliament have acted as kingmakers, granting them disproportionate political power.

Netanyahu has been slammed for his handling of the coronavirus crisis, including for having imposed virus restrictions that critics say favor his ultra-Orthodox partners.

Gamzu had pushed for targeted lockdowns in early September, focused on areas with worrying outbreaks, including many ultra-Orthodox communities.

But after fierce pressure from ultra-Orthodox leaders, Netanyahu decided against such measures and instead imposed a nationwide lockdown weeks later.

"Netanyahu is so afraid of his Haredi partners that he announced he was locking down the whole country without the whole country needing a lockdown," opposition leader Yair Lapid told The Associated Press.

Pointing to continued mass weddings and study sessions among the religious, Lapid said that "before they harm the general public, they are harming themselves,."

Secular Israelis have watched with exasperation as police have ticketed individuals not wearing masks or restaurants opening in defiance of the rules, while seemingly turning a blind eye to the transgressions of the ultra-Orthodox. In recent days, however, police have begun to crack down on religious scofflaws as well.

Netanyahu's opponents also accuse him of trying to squash the persistent protests against him, including outside his Jerusalem home, under the guise of the nationwide lockdown.

Experts say any gains made in recent years at integrating the ultra-Orthodox into Israeli society — a crucial step to ensure the sustainable growth of Israel's economy — could be wiped out by the renewed bitterness wrought by the virus.

"The coronavirus will disappear at some point," said Yedidia Stern, an expert on religion and state at the Israel Democracy Institute, a Jerusalem think tank. "But what kind of society will we be after it?"