Two teenagers drowned while swimming off Coney Island in Brooklyn as a thunderstorm rolled into the area Friday evening, the second such fatal episode at a New York City beach in less than a month.

Two girls, ages 17 and 18, were reported missing after going into the water near Stillwell Avenue shortly after 8 p.m., according to the New York City Police Department. Rescue divers retrieved two people, who were taken to the hospital in critical condition, police and fire officials said.

Both were later pronounced dead at the hospital, according to the police. People at the scene said a man might have gone into the water to help the teenagers, but that was determined not to have been true, a police spokesman said.

The deaths, two weeks after two teenagers died swimming off the Rockaways in Queens, mark a particularly deadly start to the summer season at New York City beaches, where drownings have been a perennial problem. With more than two months remaining, the city matched last year’s total of four lives lost.

Forecasters had warned of a high risk of rip currents building in the area Friday night. The episode was reported after lifeguards went off duty at 6 p.m.; most recent drownings have happened outside the hours that lifeguards are posted, when swimming is technically prohibited.

Last July, a 15-year-old died while swimming off the Coney Island beach, according to the National Oceanic and Atmospheric Administration’s database of deaths linked to rip currents.

Rip currents kill more than 100 people each year in the United States and account for most beach rescues. Experts advise calmly treading water without trying to get directly back to shore, signaling for help and swimming parallel to the beach until reaching an area beyond the rip current.

Earlier this year, city officials announced plans to use drones to help with rescues and prevent drownings, after a severe lifeguard shortage last summer. The effort would begin in Coney Island, Mayor Eric Adams said at the time.