PORTLAND, Ore. — The Oregon Court of Appeals vacated the conviction Wednesday of a man who was sentenced to prison for raping a woman he met on a dating website.

The appellate court found a district judge erred in denying a motion that would have required the woman to comply with a subpoena and turn over her computer for a private inspection by the court for relevant evidence.

Thomas Bray’s attorney repeatedly sought computer evidence before trial after learning the woman told investigators she had gone online to look for information about Bray and the legal definition of rape.

The case will return to Deschutes County Circuit Court unless state Attorney General Ellen Rosenblum decides to appeal to the Oregon Supreme Court, Deschutes County District Attorney John Hummel said in a phone interview.

If Rosenblum doesn’t do that, then the case goes back to the district judge who must decide whether to consider the computer evidence in light of a 2016 appeals court decision that gives more guidance on such issues, he said.

“It’s hard enough for a victim of sexual assault to come forward . but now if a victim’s thinking, ‘I have to come forward, but I also have to show every Facebook post I’ve ever made, every email I’ve ever sent’ __ this is chilling for survivors of sexual assault,” Hummel said.

A copy of the victim’s computer hard drive was preserved, he added.

Bray, who is from Bend, Oregon, was sentenced to 25 years in prison for the February 2011 rape of the 23-year-old woman. Bray taught at Central Oregon Community College and was a licensed anesthesiologist.

Kendra Matthews, who represented Bray on appeal, did not return a call seeking comment Wednesday.

The victim met Bray on the online dating website match.com and went back to his condominium with him for a glass of wine after their first date.

Over the course of five hours, she told investigators, Bray raped, beat and choked her, causing her at one point to lose consciousness.

During her police interviews, the woman mentioned the internet searches.

Bray’s attorney had said a review of her computer hard drive could help exonerate his client.