Halloween came early this year for one California woman who was attacked by a man in a Barbie costume while she was using the bathroom.

The unnamed victim told a judge on Monday she was in the restroom at Big Lots in San Diego on Feb. 26 when she noticed a man's exposed feet in the stall next to hers, NBC San Diego reported.

Next thing she knew, a Barbie-costumed man peered at her from the top of the stall before stooping down to climb underneath the stall into hers.

"He got right in. He made his hand into a C-clamp," the woman testified at the preliminary hearing. "He put his hand on my neck and pushed me against the wall."

Fearing she would be raped, she tried to scream but the man covered her mouth. She continued to fight back until she freed herself and fled the bathroom.

"I just told myself, I'd rather die than be raped by this man," she said according to the station.

Surveillance footage from the Big Lots store in the Clairemont suburb shows a man walk into the men's bathroom and walk out in a pink child-sized dress. He then snuck into the lady's room moments before the unsuspecting woman walked in.

The video was taken during the February incident but was not released until Monday, NBC San Diego reported.

Detectives from the San Diego Police Department's Sex Crimes Unit said the attacker, identified as 40-year-old Gregory Philip Schwartz, harassed several other people in Clairemont that same day, the station reported.

A hair salon employee said the suspect opened her car door as she was sitting inside and asked if she wanted to do meth, said Detective Carmelin Rivera from the sex crimes unit.

Schwartz was arrested four days after the Big Lots incident. Police learned he was living out of his car.

The judge ruled there was enough evidence for Schwartz to stand trial. He is expected to appear in court Aug. 25.