A suspected MS-13 gang member was captured Saturday, days after he broke into the New York City bedroom of a sleeping 11-year-old girl and raped her, police said.

Julio C. Ayala, 18, was arrested Saturday and charged with rape, sexually motivated burglary, criminal sex act, sexual abuse and act in a manner injurious to a child, New York City police said. Police told Fox News that Ayala is believed to be an MS-13 gang member and is from El Salvador.

Authorities have been hunting for the 18-year-old since Wednesday after he allegedly climbed into the girl's bedroom in Brooklyn through the second-floor window about 11:30 p.m. and raped her.

The attacker fled the scene through the window as the girl "cried for her parents' help." The parents called 911.

Authorities looked through nearby surveillance video and spotted Ayala walking near Flatbush and Parkside avenues as he was putting a sweatshirt on over his tank top.

DOZENS OF MS-13 GANG MEMBERS CHARGED FOLLOWING DRUG, MURDER PROBE, U.S. ATTORNEY SAYS

Ayala, who lives near the girl, was found Saturday hiding in an under-construction three-story building by officers from the New York Police Department's Emergency Service Unit, the New York Post reported.

Neighbors cheered as he was being taken into custody.

Police sources told the New York Post that Ayala's only form of identification was a Permanent Resident Card, also known as a green card.

Ayala is expected to be arraigned Sunday.