A 35-year-old man was arrested and ordered held without bail after prosecutors said he attempted to rape a woman inside a Manhattan nail salon on Sept. 1.

Joseph Wichard was picked up at a Harlem homeless shelter and arraigned Sunday on charges of first-degree attempted rape and first-degree attempted sexual abuse, prosecutors said. The complaint says the attack unfolded shortly after 6 p.m. inside a salon on West 36th Street near Broadway.

According to the criminal complaint, the 34-year-old victim was cornered after Wichard entered the shop and forcibly removed her pants and underwear before beginning to fondle her. The woman managed to break free but was dragged back into the salon, where she struck the suspect in the head with a vacuum cleaner, knocking off his New York Mets cap and prompting him to flee, the filing says.

The victim received treatment at a hospital and was listed in stable condition with minor injuries, prosecutors said. It was not immediately clear whether she was an employee of the salon.

Police tracked Wichard to a Harlem shelter on Saturday and placed him under arrest. He was sent to Rikers Island following his arraignment. Prosecutors allege the attack amounts to first-degree attempted rape and first-degree attempted sexual abuse; the case remains pending as formal proceedings continue.

The arrest comes amid ongoing public discussion in New York about homelessness and public safety, with law enforcement and prosecutors increasingly pointing to shelter locations as potential sites for locating suspects in violent incidents. Officials did not provide additional information about Wichard’s background or any prior criminal history in court filings released Tuesday.

Investigators are continuing to review the incident and any related evidence noted in the criminal complaint. No further court dates were immediately available from the arraignment report.