A man on trial for exposing his genitals to children and adult women several times has been set free from jail after prosecutors failed to prove a simple point: that the alleged crimes took place in Spokane County.

Mikhail G. Karpov, 47, faced five charges of indecent exposure. His trial began Wednesday. Multiple women and girls said Karpov pulled down his pants and exposed himself to them, including at least once on the day after Karpov was released from jail after being arrested for the first four charges.

Defense attorney Brendan Kidd said the prosecution rested its case against Karpov on Thursday afternoon. As he was reviewing his notes on witness testimonies he noticed that no one had ever established that the crimes happened in Spokane County, a required element for every criminal case.

Usually the prosecuting attorney will simply ask a witness if the alleged crime happened in Spokane County, Kidd said.

“They normally have a script they go off of,” he said. “These things have to be proven.”

Kidd filed a motion Friday morning requesting that all charges be dismissed. He said Judge Vance Peterson checked his own notes and went back over audio recordings of the testimony and then dismissed the charges. The charges cannot be refiled.

A mistake like this is very rare, Kidd said. “I’ve seen it happen once,” he said.

The prosecutors on the case were new to the job, having been admitted to the Washington State Bar Association within the last few months.

Rachel Sterett, supervisor of the District Court unit in the prosecutor’s office, released a one-sentence statement via email Friday afternoon.

“We respectfully disagree with the court’s ruling today and plan to appeal,” she wrote.

Sheriff Ozzie Knezovich said he also disagrees with the judge’s ruling. Part of any hearing to determine probable cause, which happens after arrest, is establishing that the incidents happened here, he said.

“The case law is fairly clear on this,” he said. “Jurisdiction has already been established.”

Retired Spokane County District and Superior Court Judge Jim Murphy said jurisdiction has to be established at trial, not just during a probable cause hearing.

“Without that, you can’t have a conviction,” he said. “You must prove it happened in Spokane County. If they fail to do that, the judge has no power to make a decision in the case.”

Judge Peterson would have had no discretion and had to dismiss the case, Murphy said.

Karpov has been held in the Spokane County Jail on $50,000 bond since June 13 and Knezovich said he worries about him being released.

“This individual is a danger to the community,” he said. “He’s targeting young children.”

Juror Kevin Schallert said the jury wasn’t told why the case was dismissed and he was appalled to find out the reason later in the day. “I’m so mad right now,” he said. “I’m a single dad with a daughter.”

He said he thought the prosecutors were poorly organized and didn’t seem prepared.

“The prosecution left so many questions unasked,” he said. “It was a joke.”

Schallert said it was hard to see two young girls get up on the witness stand and talk about what had happened to them. He said he thought they were very brave.

“This has been a really emotional ride, listening to these kids testify,” he said.