On a humid Saturday night, under a segment of the Kosciuszko Bridge, which connects Brooklyn and Queens, hundreds of people at an illicit gathering danced and swayed to the thumps of hip hop and electronic music. Some wore masks. Many did not.

Many were attending their first party in months, since the pandemic had forced many venues to close.

“People were just enjoying themselves,” said one of the attendees, Jimmy Escobar, 30, of Brooklyn. “People got locked up for so long, and they finally got to go out.”

New Yorkers, by and large, have adhered to rules mandating social distancing and mask wearing. The diligence has helped keep the coronavirus under control in the city even as outbreaks have raged across the country, primarily in the South and the West.

As the summer wears on, however, mounting reports of parties, concerts and other social events, like the rave attended by Mr. Escobar, are raising fears that New York’s hard-earned stability may be tenuous.

Over the last few weeks, videos and photos posted on social media — at bars, at beaches, at warehouses, at pools, at hotels — show densely packed, mask-free crowds, similar to the Memorial Day weekend gatherings at Lake of the Ozarks in Missouri and in states like California and Florida that are now reeling from virus outbreaks.

The images contrast sharply with the memories of a brutal spring in New York that left tens of thousands dead, disproportionately ravaging low-income communities and neighborhoods with high numbers of Black and Latino people.

“It’s disrespectful,” Gov. Andrew M. Cuomo said at a recent news conference about the partying. “It’s illegal. It not only violates public health, but it violates human decency.”

Many of the images show how a segment of the nightlife industry, a crucial piece of New York City’s culture, is desperately trying to revive itself after having been shut down when the pandemic hit.

But other events, which charge for tickets, drinks or other amenities, perhaps illustrate how some people are looking to capitalize on the public’s restlessness.

Updated

Osvaldo Chance Jimenez, 44, who has helped organize underground parties in New York City in the past, said the growing number of events risked seeding future outbreaks, which would likely disproportionately affect communities of color, particularly in Brooklyn and Queens where many of the gatherings are taking place.

Mr. Jimenez has used his Instagram account, @hilovenewyork, to draw attention to what he sees as reckless behavior. He pointed to yacht parties where organizers are selling tickets for up to $100, and a requirement at a day club at the Ravel Hotel in Long Island City, Queens, that guests pay between $35 and $50 to take a rapid coronavirus test on site, as examples of what he called “vulture capitalism.”

“It is the arrogance of money,” he said. “These people do not care.”

Lauren Flax, a D.J., producer and artist based in Brooklyn, said people should not be partying yet. Ms. Flax has lost work and is living off unemployment checks and other government assistance. But she said that even thinking about holding a dance party would be irresponsible before there was a better understanding of the virus and better testing technology.

“I don’t think any of us should be thinking about our career right now,” she said.

Asked this week about the rave under the Kosciuszko Bridge, and an illegal boat party with more than 170 guests that was held over the weekend, Mayor Bill de Blasio said the authorities had moved quickly to address a few cases of wrongdoing and that most people were following the rules.

“But where we see something wrong, we got to go in and stop it immediately,” the mayor said.

The New York City Sheriff’s Office, one of the city agencies tasked with enforcing the social distancing rules during the pandemic, has responded to several reports of illegal parties since the pandemic began, including the boat party, Sheriff Joseph Fucito said.

He said the office was trying to take a more proactive approach to stop the parties before they take place.

Dr. Jay Varma, Mr. de Blasio’s senior adviser for public health, said the city had not “seen any large clusters specifically associated with any of these events.” But about 15 percent of people who test positive in the city, and are interviewed by contact tracers, reported being at some sort of gathering outside of their home, city officials said.

City data indicates that while the parties and other gatherings are on the rise, the outbreak does not appear to be worsening. The number of new hospitalizations in a day has not reached 50 in weeks — in March and April, it was routinely higher than 1,000 per day, according to city data.

An uptick in cases also did not materialize after thousands of protesters, many of them wearing masks, gathered for weeks during Black Lives Matter demonstrations across the city.

But the fear, Mr. Jimenez and others say, is that younger people who get infected while attending a party, and who may be less likely to be severely affected by the virus, will spread it to more vulnerable people.

“Things are only going to get worse,” he said. “I feel for my city. I pray that I’m wrong.”

Andrew Rigie, the executive director of the New York City Hospitality Alliance, said the parties should not come as a surprise.

“People will socialize in nightlife spaces, whether you like it or not,” Mr. Rigie said. “You could have unsafe, unregulated nightlife. Or you can do everything you can to have safe, regulated nightlife. But we can’t act as if it’s not going to exist.”

Mr. Rigie said that local, state and federal governments should be providing financial assistance, like rent support, to these businesses and others affected by the nightlife shutdown, and that there should be better guidance and research on how to operate safely.

Some businesses, like the Ravel Hotel, have tried to figure that out themselves, with mixed results. The hotel’s day club, Profundo, which has an outdoor rooftop pool, re-opened in late June at 50 percent capacity and required guests to be tested for the virus on site.

The rapid tests used by the hotel were made by Abbott Laboratories, according to Gothamist. The tests, authorized by the Food and Drug Administration for emergency use, were designed to provide results within minutes.

Image
Credit…September Dawn Bottoms/The New York Times

But the F.D.A. had said in May that the tests might be delivering false negative results, raising questions about safety at Profundo.

Then, on July 4, videos and photos posted on social media showed several poolside guests at the hotel not wearing masks, and standing and dancing close together. In a statement, the hotel acknowledged that those guests were “not following directions,” but said that it had “retrained security and staff on how to handle these situations moving forward” with the help of the city.

An F.D.A. spokeswoman said this week that the agency had since worked with Abbott to improve the test. A spokeswoman for the hotel said this week that the tests were no longer being administered, but would not answer questions about why.

Seth Levine, an owner of the Ravel Hotel, said in a separate statement that the site also provides guests with hand sanitizer, masks and printed rules about social distancing. A security team makes sure guests wear masks when moving around the property, he said.

Some guests said they believed that the tests and other measures had adequately lowered the risk of infection or transmission. Joey Sutera, who works in marketing, said he went to the rooftop pool on July 4 with 30 friends.

“We look at New York and there’s zero deaths,” he said, referencing a day last month in which the city did not initially report any coronavirus-related fatalities. “And it’s like, New York has it under control. So, is the reward greater than the risk when we’re young and been locked up for so long in solitary confinement? I think people are willing to take that risk.”

A D.J. performed at Profundo on Monday, and the venue was beckoning guests to gather there this weekend. One of its posts on Instagram offered a free bottle of rosé to some guests who missed celebrating their birthday because of the pandemic. A poolside table was listed at $500 on the hotel’s website.

Mr. Escobar, who attended the party under the bridge, said he was not worried about contracting or transmitting the virus. He did not have symptoms, he said, and a sign at the party told people to wear a face covering. He saw people handing out hand sanitizer and masks.

“If people want to go out and enjoy themselves, regardless of risk, let them do it,” he said.

But Kristina Alaniesse, 36, who has worked as an event promoter and now posts images on Instagram of reckless behavior at parties, said the danger was not only for the partygoers, but the people they interact with later.

“It’s not a time to celebrate,” she said. “We’re not out of the woods.”