DOVER — A man who police accuse of multiple counts of aggravated felonious sexual assault, kidnapping and armed robbery was arraigned in Strafford County Superior Court and is being held on $500,000 cash.

Joshua K. Flynn, who also goes by the last name alias Anderson, is also a suspect in a number of recent area robberies.

On Friday, Flynn, of Bristol, N.H., allegedly committed two counts of aggravated felonious sexual assault at Durham’s Emery Farm, according to Strafford County Assistant Attorney Joachim Barth, as well as armed robbery and three counts of kidnapping at the same location. He did not offer any additional details on the assault charges.

However, according to the affidavit from Durham Police for the arrest warrant, Flynn allegedly sexually assaulted a woman during the robbery at Emery Farm. The affidavit states a person was at the farm when Flynn arrived at the business and brandished a knife, “and forced her by implied threats, at knifepoint, into a private office where he robbed and sexually assaulted her.” The victim said Flynn demanded vehicle keys and cash. She was later transported by ambulance to Portsmouth Regional Hospital, according to the affidavit.

Another person said she arrived at the farm as the incident was occurring. Flynn then came out of the office and threatened her with a knife, the affidavit states. She said Flynn demanded to know where the safe was, and she told him there was no safe but she had some money in her car. Flynn then allegedly cut power cords in the business, which he used to tie up the two people plus another customer who entered the store while the incident unfolded.

The third person said she entered the store and heard the two females. Flynn came out of the office “with a knife in hand, and grabbed her by the arm, and took her to the office, demanded she remove her jacket, and tied her hands together,” the affidavit states.

While all three were tied up, the owner of the car told Flynn to take her vehicle, “in a desperate attempt to convince him to leave without harming them further," the affidavit states. After Flynn left in her car, the third person was able to free herself and then the other two women. He left his grey Jeep Cherokee behind in the lot at the farm. The vehicle was registered to Joshua Anderson.

The owner of the car told police that her cell phone was in the vehicle, which police used to track the location of the car, which turned up at Portsmouth Chevrolet by the traffic circle. Workers at the dealership informed police that a man identified at Anderson presented a driver’s license to take a 2017 Chevrolet Silverado 1500 for a test drive, according to the affidavit. The truck was located at the Five Guys parking lot on Lafayette Road in Portsmouth.

“Portsmouth Police saturated the area and eventually checked the C&J Bus Terminal” located at Pease and learned a male fitting the description of Flynn had purchased a ticket paying in cash. Police took Flynn into custody at the bus terminal.

According to the affidavit, Flynn was advised of his Miranda rights and agreed to a recorded interview at the Portsmouth Police Station, where he allegedly admitted to committing the robbery, sexually assaulting a woman and tying the three women up.

On Monday morning, Flynn was arraigned by video in Portsmouth Circuit Court as Joshua Anderson on one charge of a Class A felony of receiving stolen property in connection with the women's stolen car and his bail was set at $20,000 cash, which Flynn did not protest.

Portsmouth Police Prosecutor Rena DiLando told Judge John Pendleton that Flynn had escape convictions from Rhode Island “and a lengthy criminal history” from the state.

Flynn offered to waive bail. “I’m not going anywhere,” he said. “I’ve got a probation violation out of Rhode Island and New Hampshire. I’ve got dozens of charges out of Strafford County, so I’ll just wait. There’s no need to waste the court’s time.”

In Strafford County Superior Court, he was arraigned as Flynn, though he waived arraignment after consultation with a public defender. The bail was set a half a million because, “He’s dangerous and a flight risk,” Barth said. “He just finished a lengthy prison sentence out of Rhode Island that involves violence.”

Durham Deputy Chief Rene Kelley said on Monday there some confusion of what his actual last name is.

Kelley said on Friday that his department is working in partnership with detectives from Portsmouth, Dover, Somersworth and Rochester, as he may be a suspect in the armed robberies in Rochester, Somersworth and Dover that have occurred this week, Kelley said.

Flynn has not yet been charged with any of the recent robberies that occurred in Strafford County last week, including three armed robberies that occurred in two days in Rochester, nor was he charged in the two knifepoint robberies last Thursday. One of those occurred in Somersworth and the other one was in Dover.