Updated Sunday, April 24, 2016 1:31 p.m.

NEW YORK (CBSNewYork) — Police said an autistic teen walked out of a Saturday program at P.S. 721 in Coney Island and went to the beach.

READ MORE: 2-Year-Old Shot In Head In Newark Survives Emergency Surgery, Family Says; Police Looking For Suspects

Authorities got 911 calls from the school and later at the beach, where police said the nonverbal 14-year-old was going in and out of the water with no clothes on.

“It was a very dangerous situation,” Sgt. Christopher Vincenti told 1010 WINS’ Holli Haerr, noting there were rocky ocean conditions.

He tried to call to the teen to get him to come out, but when that didn’t work he and other officers went into the water themselves and rescued him to safety.

READ MORE: Group Marches Across Manhattan Bridge To Protest Shooting Death Of Daunte Wright In Minnesota

“We didn’t know if he could swim or anything like that. It could have been bad, but luckily luck was on our side and we were in the right place at the right time,” he said.

The teen left the school through a door that had an alarm on it, police said.

The teen was taken to the hospital for evaluation.

MORE NEWS: Hundreds Gather At Police Dept. In Minneapolis Suburb For 2nd Night Of Daunte Wright Protests

Toya Holness, a spokeswoman for the city Department of Education, told CBS2 in an email: “‎Yesterday’s event was hosted by a community based organization and was not a DOE program. This is a deeply alarming incident. Nothing is more important than the safety of all students and staff. We are working closely with the organization that hosted the event and the NYPD to investigate this incident. We train CBO providers on DOE Emergency Protocols‎ and will continue to provide ongoing support.”