A panel of judges reversed the trial court's conviction of Julio Morales and remanded it for retrial, in a decision posted Wednesday from the Los Angeles-based court.
Morales had been sentenced to three years in state prison. He was accused of entering a woman's bedroom late one night after her boyfriend had gone home and initiating sexual intercourse while she was asleep, after a night of drinking.
The victim said her boyfriend was in the room when she fell asleep, and they'd decided against having sex that night because he didn't have a condom and he had to be somewhere early the next day.
Morales pretended to be her boyfriend in the darkened room, and it wasn't until a ray of light from outside the room flashed across his face that she realized he wasn't her boyfriend, according to prosecutors.
"Has the man committed rape? Because of historical anomalies in the law and the statutory definition of rape, the answer is no, even though, if the woman had been married and the man had impersonated her husband, the answer would be yes," Judge Thomas L. Willhite Jr. wrote in the court's decision.
The appeals court added that prosecutors argued two theories, and it was unclear if the jury convicted Morales because the defendant tricked the victim or because sex with a sleeping person is defined as rape by law.
The court said the case should be retried to ensure the jury's conviction is supported by the latter argument.
The decision also urges the Legislature to examine the law, which was first written in response to cases in England that concluded fraudulent impersonation to have sex wasn't rape because the victim would consent, even if they were being tricked into thinking the perpetrator was their husband.
Willhite noted that the law has been applied inconsistently over the years in California.
In 2010, a similar law in Idaho prevented an unmarried woman from pressing rape charges after being tricked into sex with a stranger by her then-boyfriend.
The judge called what happened "despicable" but said the state's law left the court with no choice. Idaho's law was amended to cover all women in 2011.
Morales' attorney Edward Schulman declined comment when reached by phone Thursday.
Prior to the conviction, Schulman had argued Morales believed the sex was consensual because the victim responded to his kisses and caresses, according to the decision.