A Randolph man dressed in a security guard uniform forced a woman to strip and then tried to grab and kiss her before she was able to flee, a Suffolk County prosecutor said.

Isaiah Brown, 26, stood out of sight behind a door inside a 5th-floor courtroom in Boston Municipal Court. Charged with indecent assault and battery, two counts of assault and battery, and impersonating a police officer, Brown was ordered held on $5,000 bail.

Brown, who his attorney said lives with his parents in Randolph, approached a woman at about 2:30 a.m. Friday morning on Hanover Street in the North End, Assistant District Attorney Ben Megrian told the court.

“He said he needed to talk to her and she had to come with him immediately,” Megrian said. “The suspect asked her to strip, the victim pulled her pants down to her knees, exposing her underwear. The suspect got closer and attempted to kiss her and rub her waist area.”

The victim screamed and was able to flee at that point, Megrian said. Police were able to see the encounter on nearby security footage, Megrian said, and a manager at a downtown Boston security firm identified Brown as the suspect in the footage.

Brown, who is listed in court records as an employee at Northeast Security, was wearing a security guard uniform at the time of the encounter, Megrian said.

“The defendant demanded an ID from the victim and told her she was under investigation,” the prosecutor said. “The defendant was wearing a security officer uniform with a badge, leading the victim to believe the suspect was a police officer.”

Megrian asked for $15,000 bail. Brown’s attorney, Justine Whalen, asked for a low cash bail or personal recognizance, noting her client’s lack of criminal history, the fact that he is about to complete his studies at a community college, and that his parents and several siblings were present in court on his behalf.

Whalen also blasted the police report as “poorly written” and “confusing” and said the identification and statements Brown gave to police — during which, Megrian said, Brown admitted to following the victim but said she initiated the physical contact — could be challenged in future court proceedings.

A woman who identified herself as Brown’s sister said her brother is a man of “excellent character.”

“My brother would never do anything like this,” she said as she pushed past reporters.

It was not immediately clear whether Brown was able to post bail. He is due back in court Dec. 18.