A Hasidic synagogue in Brooklyn planned the wedding of a chief rabbi’s grandson with such secrecy it was able to host thousands of maskless celebrants without the city catching on.

Despite a surge in COVID-19 cases, guests crammed shoulder-to-shoulder inside the Yetev Lev temple in Williamsburg for the Nov. 8 nuptials — stomping, dancing and singing at the top of their lungs without a mask in sight, videos obtained by The Post show.

Organizers schemed to hide the wedding of Yoel Teitelbaum, grandson of Satmar Grand Rabbi Aaron Teitelman, from “the ravenous press and government officials,” says a detailed account in the Yiddish newspaper Der Blatt, the publication of the Satmar sect.

“Due to the ongoing situation with government restrictions, preparations were made secretly and discreetly, so as not to draw attention from strangers,” the paper reported in its Nov. 13 edition.

“In recent weeks, organizers worked tirelessly to arrange everything in the best way possible. All notices about upcoming celebrations were passed along through word of mouth, with no notices in writing, no posters on the synagogue walls, no invitations sent through the mail, nor even a report in any publication, including this very newspaper.”

The Satmar synagogue, which has a maximum capacity of 7,000, jammed men onto bleachers filled to the rafters, the videos show. Women sat in the balcony behind a barricade.

Last month, the state ordered the cancellation of another Williamsburg wedding planned for a grandson of Satmar Grand Rabbi Zalman Teitelbaum, a brother and rival of Aaron, after that publicized event was expected to draw 10,000 people. The congregation called it “an unwarranted attack.”

That crackdown led to a determination to keep plans for the Nov. 8 affair under wraps. The stealthy arrangements continued amid a fear that someone would blow their cover.

“The days leading up to the wedding were filled with tension, not knowing what the next day, or the next moment, will bring; which disgruntled outcast might seize this opportunity to exploit even what hasn’t been written or publicized, to create an unnecessary uproar, and to disrupt the simcha, God forbid,” Der Blatt reported.

The synagogue’s stunning willingness to host a potential super-spreader event underscores what critics call the Hasidic community’s ongoing disregard and outright defiance of efforts to control the deadly coronavirus, which has killed nearly 25,000 people in New York City.

Ironically, the synagogue’s own president, R’Mayer Zelig Rispler, who openly urged Brooklyn’s Orthodox community to abide by coronavirus safety measures, died of COVID-19 last month at age 70.

New COVID-19 cases in New York City rose to 3.11% Saturday, according to City Hall. There were 1,345 new COVID-19 cases and 118 patients admitted to the hospital with the potentially deadly virus, Mayor Bill de Blasio tweeted Saturday.

“This weekend is critical to fighting back #COVID19,” the mayor warned.

“A second wave is bearing down on us,” Hizzoner told WNYC’s Brian Lehrer on Friday. “We need restrictions. It’s just clear that restrictions are the only way to turn back this kind of a surge.”

De Blasio and Gov. Cuomo have both talked tough about repeated violations in the ultra-Orthodox communities, but ultimately have avoided curbing the mass gatherings of Hasidic leaders with whom they’ve had longstanding relationships.

“The ability of Hasidic leaders to compel their followers to so brazenly violate the rules and norms extends well beyond the pandemic, and is enabled by government officials turning a blind eye for political reasons,” said Naftuli Moster, executive director of YAFFED, a nonprofit that advocates for improved secular education in yeshivas.

Mitch Schwartz, the mayor’s Director of Rapid Response, could not explain why the city failed to detect the enormous Nov. 8 celebration — and let it go off without a hitch.

Next door to the synagogue at 14 Hooper St. is the firehouse of Engine and Ladder Cos. 211 and 119, but the FDNY said it wasn’t called to inspect the synagogue. The FDNY is one of a host of city agencies that inspect sites for COVID-19 violations, along with the NYPD, the Sheriff and the Health Department.

The event “clearly violated” Covid restrictions on indoor occupancy, FDNY spokesman Frank Dwyer said.

Under current rules posted by the city, houses of worship may hold indoor religious services in one room with occupancy limited to 50 percent capacity. Also, attendees from different households must maintain six feet of social distancing, or wear face coverings.

Asked whether the firefighters noticed anything amiss next door, Dywer said, “Firehouses don’t conduct surveillance on their neighbors.”

Schwartz said, “The city performs a tremendous number of inspections daily, and our community outreach team is dedicated to relaying the latest happenings across the city.

“But let’s be clear: indoor gatherings of this size aren’t acceptable, and they’re offensive to all the sacrifices New Yorkers have made to keep their families and neighbors safe from COVID-19.”

Asked whether the Satmar synagogue would face any consequences for violating the restrictions, Schwartz gave no answer.

It wasn’t the sect’s only recent event. Aaron Teitelbaum led a Chumash, a celebration of the Torah, on Oct. 27 at its Borough Park synagogue — when it was in a state-designated, high-risk “red zone.”

Religious leaders have blasted what they consider a double standard, saying city and state officials have condoned the gathering of thousands in the streets to protest police brutality and to celebrate Joe Biden’s election victory.

But some members of the Orthodox community are mortified by the recklessness of their own lifestyles.

“We can have our misgivings about total shutdowns, and other extreme measures, but there’s zero excuse to completely ignore anything that might help reduce the virus a bit,” one told The Post.

“We don’t wear masks anywhere, we don’t soap our hands, we have huge packed gatherings, we shake hands – there’s zero indication that we’re in the middle of a pandemic and that people in this country and in our community are still getting the virus and dying. And it’s not just the lay people doing all this; it’s the rabbis themselves not caring one bit.”

Messages sent to Satmar officials requesting comment were not returned.

The Sunday night wedding capped a three-day affair, which began on Friday night with four hours of festivities, and continued on Saturday with Sabbath services, including a bris of an 8-day-old boy.

The white-gowned bride was not named by Der Blatt, but a relative said her name is Miriam.

The Der Blatt account reveled in the success of the covert operation: “Now that the wedding has passed, thank God, after being held with great splendor and fanfare, the sentiment expressed by all is: how privileged we are, how good our portion, how fortunate our lot, to have merited the experience of such a glorious night.”