UPDATE: The beach at Jacob Riis Park has been reopened for swimming after officials for Gateway National Recreation Area said bacteria measurements had returned to health levels.

There was one less place to cool down from this week’s intense heat because the beach at Jacob Riis Park in Queens was closed to swimming on Thursday due to high bacteria levels found in water samples.

Water samples from Tuesday and Wednesday showed a high bacteria count, officials said. Because of this, water samples will be collected every day until bacteria levels are below a safe threshold and can be opened up to the public again, according to Daphne Yun, public affairs specialist for Gateway National Recreation Area, which manages the beach.

Water checks occur every Monday, and if there are high levels of bacteria for two consecutive days, beaches are closed to swimming, Yun said.

The closure came as the city braced for another brutal heat advisory with near-record-high temperatures expected through the end of the week.

Although Rockaway Beach shares the same body of water as Jacob Riis Park, no sections of Rockaway Beach were shut down on Thursday due to water quality issues, officials said. Some stretches of Rockaway Beach have been closed to swimming, however, due to construction and lifeguard shortages.

The New York City Department of Health is responsible for testing the water quality at city beaches. The DOH did not immediately respond to questions about bacteria levels on Thursday, but recorded good water quality levels at Rockaway Beach as of July 23rd, according to the agency’s website.

Usually, high bacteria levels at beaches occur after a heavy rainfall, authorities said. Most of New York City has a combined sewer system, which means there is one pipe that carries both stormwater runoff and sewage from buildings. Heavy rainfall can force untreated sewage discharges and trash from streets into surrounding waterways, such as the beach at Jacob Riis Park.

If heavy rain had occurred within the last three weeks, it could impact the city’s waterway quality, Yun said.

For the last few weeks, there have been some parts of the city that experienced intense rainfall and flash flooding, while other parts of the city experienced sunshine all day, said Andrew Kruczkiewicz, a senior researcher at Columbia University’s International Research Institute for Climate and Society.

Although it may not have rained recently for some New Yorkers, a flash flood or storm in another neighborhood may have led to the stormwater runoff that caused high bacteria levels at Jacob Riis Park's beach, Kruczkiewicz said.

It is possible that there are different bacteria levels in the beach at Jacob Riis Park and Rockaway Beach because there are different tidal patterns that occur at both, he said.

The beach closure is also a good opportunity to think about the secondary and tertiary effects of climate change, such as higher instances of flash flooding and how underserved communities are impacted, Kruczkiewicz said.

“In New York City, the pools and beaches are critical resources for many people to cool off, so when you have beach closures, it impacts different parts of the population disproportionately,” he said.

The most common illness associated with swimming in polluted water is the stomach flu with symptoms such as nausea, vomiting and diarrhea. But usually, swimming-related illnesses do not have long-term health effects, according to the U.S. Environmental Protection Agency.