Getting your Trinity Audio player ready...

A 27-year-old man was held without bail after breaking into a South Loop condominium while naked and sexually assaulting a woman Sunday morning.

James Allen, who did not appear in court Monday because he was undergoing a mental evaluation at a hospital, has been charged with two counts of aggravated criminal sexual assault, home invasion and three counts of residential burglary, prosecutors said.

A naked Allen “traveled throughout” the building, trying the door handles of multiple apartments in the first block of East 16th Street about 5:30 a.m. Sunday, prosecutors told a judge in court.

When he entered a fifth-floor unit, he found the victim, 31, asleep in a bed and her friend, a 25-year-old man, sleeping on a couch.

She screamed when Allen went into her bedroom and began sexually assaulting her, waking up the 25-year-old man, who ran into the room, pushed Allen off her and fled to the hallway for help, prosecutors said.

Allen followed him but then walked to the floor below and broke into another apartment where three people in their 20s were sleeping. There, he took a cellphone, glasses and other belongings, but when one of them woke up, he confronted Allen, who ran upstairs to the ninth floor, where he broke into a third apartment occupied by a sleeping 44-year-old man. When that man woke up and saw Allen with his laptop, wallet and guitar, he called police and building security, prosecutors said.

Police found Allen, still naked, in the 44-year-old man’s apartment. Allen was arrested after being identified by two witnesses, prosecutors said.

Police said Allen, of the 2600 block of West 83rd Street, is a convicted felon. A judge denied bail for him Monday.

baiduhai reporter Megan Crepeau contributed.