NEW YORK – Sheriff's deputies arrived at a building in midtown Manhattan just before 3 a.m. Saturday and found almost 400 people drinking and partying inside. Few were wearing face masks.

Deputies shut the party down and arrested four people. The episode reflected the way that, despite the onset of a second wave of the coronavirus, people are continuing to gather at large events in New York City in violation of public health safeguards.

Sheriff Joseph Fucito said Sunday that his office has responded to similar events around twice every weekend for the last several months.

The frequency has not changed, he said, despite increasingly dire warnings from city officials about gathering indoors during the Thanksgiving weekend and the winter holidays.

Officials are having difficulty changing people's behavior as the city enters a precarious phase of the pandemic.

The seven-day average test positivity rate in New York City was 3.9%, Mayor Bill de Blasio said Sunday, up from less than 2% at the beginning of the month. About 720 people were hospitalized in the last seven days, according to city data, while the average for the last four weeks was 555.

Coronavirus case counts are breaking records nationwide. Federal health officials on Sunday forecast another spike in infections after Thanksgiving that could lead to more deaths and more stress on hospitals. Cold weather in the months ahead will continue to force people indoors and increase the risk of transmission.

Fucito declined to say how deputies found out about the party Saturday. But they arrived at the building at 202 W. 36th St. — about two blocks north of Pennsylvania Station — around 2:45 a.m. and found more than 393 people inside.

People had paid to attend the party and for alcohol service, but the organizers did not have a liquor license or permit to serve alcohol, Fucito said. Photos shared by the Sheriff's Office show a room lit by a black light, with dozens of bottles of tequila, whiskey and vodka lining one counter.

Four people — the DJ and three others who worked at the party — were charged with violating rules meant to protect against the spread of the coronavirus. Efforts to reach them Sunday were unsuccessful.

The party was just the latest in a string of large events that the Sheriff's Office has responded to.

On Halloween weekend, deputies broke up two parties where almost 1,000 people were dancing and drinking inside warehouses. In mid-November, deputies shut down an unlicensed fight club, known as "Rumble in the Bronx," which drew 200 people. Many of those crowding inside were drinking, smoking hookah and not wearing masks, authorities said.

Last weekend, deputies broke up a sex club party in Queens and an illegal party in Manhattan. And on Thanksgiving Day itself, deputies shut down an illegal bottle club in Queens with almost 80 people.

While the constant partying and violation of coronavirus rules seem at odds with the worsening situation in New York City, there are several explanations for why people would continue to embrace risky behavior, said Jay Van Bavel, an associate professor of psychology and neuroscience at New York University, who has written about how to align behavior with public health directives during the pandemic.

He said some people may increasingly be "suffering fatigue from lack of social interaction," and younger people who tend to frequent parties may believe they are not at risk for severe health consequences.

He said misinformation may also dilute public officials' warnings and lead people to believe the risks are not severe. With the Trump administration underplaying the risk of the virus, warnings get muddied, he said.

Meanwhile, the relative lack of financial support for struggling small businesses could drive people to search for other ways to make money, including through parties and other events.

"It manifests in all these little problems," he said. "They all kind of pop up, and it's like that game where you've got to smash the groundhog that pops up; you smash one down, and another one pops up."