Throngs of Hasidic Jews gathered in Brooklyn Wednesday for a local rabbi’s funeral, brazenly flouting social distancing orders amid the coronavirus pandemic pummeling the city, online video shows.

In the 30-second clip, which has been circulating online, dozens of members of the Jewish community — some wearing protective facial masks — can be been seen marching in an outdoor procession down Avenue N near East 9th Street in Midwood as a close cluster of men carry a casket above their heads in the middle of the street.

Members of the civilian nonprofit Brooklyn patrol group Shmira can be seen guiding the heavily populated procession, the footage shows.

Shmira did not immediately respond to a request for comment.

The funeral gathering was an open violation of the social distancing orders by state and city officials who have repeatedly demanded that folks maintain at least a 6-foot distance while in public as a way to stem the spread of the potentially deadly virus.

“There’s no excuse for violating social distancing, not even for a funeral, given the current state of affairs,” political consultant Menashe Shapiro, who has ties to the Orthodox Jewish community, told The Post on Thursday. “A lot of people have said, and I agree, that funerals have to be done at a bare minimum — people have to be buried, period.”

Shapiro added, “Despite the fact that escorting someone to their final resting place is considered the ultimate kindness, what took place yesterday in that video is utterly despicable under current circumstances since it’s self-defeating and risks many more funerals.”

The funeral was held for 96-year-old Yosef Leifer, the rabbi of the nearby Congregation Karnei Reim on Avenue N, according to a man who answered the phone at the synagogue Thursday.

“People were in such a panic that the rebbe died, they weren’t thinking about corona[virus],” the man, who would not identify himself, told The Post. “They forgot about corona[virus]. They just wanted to be close to the rebbe.”

Leifer, a Holocaust survivor and rabbi of the Ukrainian Hasidic dynasty known as Nadvorna, died on Tuesday.

An NYPD spokesperson said that “no notifications” were made to the area’s 66th Precinct in connection with the funeral and that police only became aware of it from a 311 call.

Authorities responded to the scene, but “by that time it was over and the remainder of the crowd was dispersed. No arrests or summonses were issued,” the spokesperson said.

Mayor Bill de Blasio said this week that New Yorkers can face a fine of up to $500 for refusing to practice social distancing.

“Our officers will go back [to the synagogue] to further educate in social distancing and make aware of the current rules in advance of any future incident that might warrant an enforcement action,” a police spokesperson said.

Last month, members of New York City’s Hasidic and Orthodox Jewish community openly defied social distancing orders by hosting raucous Brooklyn weddings with hundreds of guests amid the growing spread of the bug.

“The community’s lack of education and basic knowledge has manifested in recent weeks over this crisis,” Shapiro said.

But Rabbi Bernard Freilich, a community leader in Borough Park, said the community is largely complying with official orders.

“Every major synagogue is closed, and is going to stay closed during Passover, which is unprecedented,” he said. “Not only that, but we (community leaders) are constantly conferencing with the NYPD and with City Hall to make sure nobody gets out out line.”

The events were held after Gov. Andrew Cuomo barred crowds of 50 or more and after President Trump said Americans should avoid events with more than 10 people.

There have been more than 1,300 deaths in the Big Apple as a result of COVID-19 and more than 47,400 confirmed cases of the virus in the city.