HARTSDALE, N.Y. (CBSNewYork/AP) — A man has been arrested on allegations that he walked into Westchester County school and stripped off his clothes.

Town of Greenburgh police said Edward Foley, 27, of Scarsdale, was arrested Thursday on criminal trespass and child endangerment charges.

READ MORE: Kreider's Hat Trick Powers Rangers To Win Over Coyotes

Police said Foley walked into Maria Regina High School, an all-girls Catholic high school in Hartsdale, on Feb. 25 and disrobed in a bathroom near the lobby.

READ MORE: New York Weather: CBS2’s 1/23 Sunday Morning Forecast

They said he then opened the bathroom door and stood in the doorway before he put his clothes back on and ran off.

Foley was released on $5,000 bail Thursday was due back in court on Friday. Attempts to reach him Thursday evening were unsuccessful.

MORE NEWS: Bratt Helps Devils Rally For Win Over Hurricanes

(TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)