Updated

They almost caught him with his pants down.

An illegal immigrant from Venezuela with suspected ties to the Tren de Aragua gang has been arrested outside a New York City migrant shelter after allegedly breaking into a Manhattan prosecutor's apartment, pleasuring himself and robbing her, according to a new report.

Brandon Simosa, 25, followed the unidentified 38-year-old woman into her apartment building near the intersection of 44th Street and Ninth Avenue around 2 a.m. Sunday, according to the NYPD.

Once inside, he demanded cash and stole credit cards and a cellphone from her purse. Then, he allegedly "performed a lewd act in front of the female" and ran away, police said.

DANIEL PENNY TRIAL: SUBWAY MADMAN CLAIMED HE HEARD TUPAC AND DEVIL BEFORE DEADLY CHOKEHOLD, SHRINK SAYS

People walk by The Row hotel in Manhttan which has golden lights under the awning

The Row NYC Hotel in Manhattan was converted into a migrant shelter. (Matthew McDermott for Fox News Digital)

The suspect is an illegal immigrant with suspected ties to the infamous Venezuelan prison gang, and the victim works for Manhattan District Attorney Alvin Bragg, the New York Post reported. 

The "lewd act" was him allegedly masturbating in her hallway before he took off, only to be arrested outside the Row, according to the paper. 

The Row is a former luxe hotel that city officials turned into a migrant shelter to help house tens of thousands of illegals who flooded into the Big Apple under the Biden-Harris administration. 

Police grabbed him around 6:30 p.m. Tuesday. Although he was hanging around the shelter, he was listed as homeless.

BLUE CITIES RUSH TO DISMANTLE MIGRANT SHELTERS AS TRUMP INAUGURATION APPROACHES

Still images from surveillance video show suspect Brandon Simosa

Suspect Brandon Simosa pictured in still images from surveillance video shared by the NYPD. (NYPD)

Simosa faces charges of sexually motivated robbery, sexually motivated burglary, grand larceny, five counts of possessing stolen property, two counts of petit larceny, and drug charges, according to the NYPD.

The Row and other New York City shelters have been identified as Tren de Aragua hot spots, and police previously blamed the gang for a rise in robberies targeting women with purses or cellphones, describing it as a "wave of migrant crime."

CLICK HERE TO GET THE FOX NEWS APP

Bragg is the controversial far-left Democrat whose office prosecuted President-elect Donald Trump and is currently trying to convict a Marine veteran who intervened during a schizophrenic man's violent subway outburst of manslaughter.