A 45-year-old man was arrested Thursday after he pulled his pants down outside a boy's locker room at East Northport Middle School, Suffolk police said.
Police said the East Northport man, whom Newsday is not naming to protect the identities of others present, was charged in connection with the incident.
The man dropped his pants at about 3:55 p.m. in front of the locker room and in the presence of three students, police said.
The students immediately reported him to school officials, said Nolan Briggs, security supervisor for the Northport-East Northport School District, in an email sent to parents.
Suffolk police arrested the man a short time later in a nearby neighborhood, authorities said.
He was charged with public lewdness, three counts of endangering the welfare of a child, three counts of seventh-degree criminal possession of a controlled substance, and unlawful possession of marijuana.
"At no time was any child approached by the individual," Briggs said in the email, which asked parents to remind their children to report "any inappropriate behavior to a trusted adult immediately."
Police said the man was being held overnight at the Second Precinct and is scheduled to be arraigned Friday at First District Court in Central Islip.