A Boulder man accused of attacking and sexually assaulting a woman after breaking into her workplace in 2021 has elected to enter a plea of not guilty by reason of insanity.

Randy James Raygor, 32, initially pleaded not guilty in July to two counts of sexual assault, second-degree assault and first-degree burglary, and was set for trial in February.

But at a hearing Friday, Raygor asked through his attorneys that his plea be changed to a plea of not guilty by reason of insanity.

Prosecutors objected to the plea, with Chief Trial Deputy Catrina Weigel saying the move was “purely a delay tactic.”

Weigel told Boulder District Judge Nancy Salomone that the case had already seen numerous competency hearings and delays, and said the time for Raygor to have entered an insanity plea was at his arraignment in July.

But Raygor’s attorneys said new information about Raygor provided by a social worker led to the motion to change the plea.

While Salomone said she also had concerns about how long the case was taking, she granted the request to enter the insanity plea.

Raygor will get a mental health evaluation at the Boulder County Jail at the request of attorneys, and was scheduled for a hearing April 5.

Salomone also canceled the February trial date.

According to an arrest affidavit, Boulder police dispatchers received a 911 call at 3 a.m. July 5, 2021. The dispatcher said it sounded like a man and a woman fighting, and that it sounded like a possible sexual assault.

Boulder police responded to the location of the call, which was redacted in the affidavit, and found a woman calling for help.

Officers said the woman was wearing only a tank top, had a swollen left eye, a bloody mouth and several abrasions.

The woman told police she was working on call by herself in a nearby building when she saw a man sitting outside about 10 p.m. July 4, 2021.

When she asked him what he was doing, the man said he was waiting for a ride.

At midnight, the woman said she checked to make sure all of the doors at the business were locked and went to sleep.

About 3 a.m., she heard a loud sound and woke up to find the man she had seen earlier was now inside the building.

According to the affidavit, the woman said the man then attacked her, and told her, “I want to rape you.” The woman said the man was able to pull off her shorts and underwear and digitally penetrated her. She said he also hit her in the face about five times.

The woman was able to activate the emergency function on her phone to dial 911 before the man threw it away, and she was also able to gouge at his eyes with her thumbs.

The woman said that when she was able to get free, the man took off and she was able to track down responding officers.

Other officers on foot in the area tracked down a man matching a description of the suspect, later identified as Raygor.

The woman confirmed Raygor was the man who attacked her when she viewed him from the back of a patrol car.