SACRAMENTO -- State Senator Noreen Evans (D-Santa Rosa) vowed Friday to introduce legislation to change sexual assault laws after a panel of state appellate judges overturned a rape conviction because of a provision dating back to the 19th century.

"I am shocked and appalled that the court didn't see fit to uphold justice for this rape survivor," Evans said.

The Los Angeles-based 2nd District Court of Appeal cited an 1872 law while reversing the conviction of a man who authorities claim pretended to be a sleeping woman's boyfriend before initiating sexual intercourse, according to the Associated Press.

The judges said the law doesn't provide unwed women the same protections as married ones in certain rape cases, the AP reported. They overturned defendant Julio Morales' conviction and remanded the case for retrial.

"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," Justice Thomas L. Willhite Jr. wrote in the court's decision posted this week.

Evans said she planned to address incongruities in California's rape laws in light of the panel's ruling.

"The fact that such an outdated loophole still exists is baffling, but I will introduce legislation this session that will bring uniform clarity. The definition of rape is found in the act itself and having sex with an unconscious person is rape. Period," she added.

Evans, whose district includes Lake County, is chair of the Senate Judiciary Committee and the California Legislative Women's Caucus.

Prosecutors argued Morales entered the woman's darkened bedroom after her boyfriend left, pretended to be the boyfriend and initiated intercourse while she was asleep after a night of drinking.

She didn't realize the man wasn't her boyfriend until outside light flashed across his face, according to the prosecution.

The defense argued Morales thought the woman was awake and reportedly presented inconsistent evidence about whether he tried to identify himself to the woman.

The appeals court pointed out that prosecutors put on two theories about the incident, and it wasn't clear whether the Los Angeles County jury found Morales guilty because he deceived the woman or because sex with a sleeping person is rape.

The judges found the latter theory correct and the former incorrect, under existing law.

The decision also encouraged state legislators look at the longtime law, which the judges said was written in response to cases in England and other places that held a woman wasn't raped if she thought the assailant was her husband.