State Sen. Noreen Evans, D-Santa Rosa, introduced legislation Tuesday that would close a loophole in a law crafted in the 1870's that led to a Southern California man's rape conviction being overturned.

The bill addresses a ruling by the Los Angeles-based 2nd District Court of Appeal, which concluded Julio Morales hadn't raped an 18-year-old because the victim was not married.

In 2009, Morales pretended to be the teen's boyfriend in order to have sex with her while she was sleeping, according to Evans.

Under a state law dating back to 1872, a person who gets consent for sex by pretending to be someone else is only guilty of rape if the victim is married and the attacker is impersonating the spouse.

Evans' bill, SB 59, would amend the law by exchanging the word "spouse" for the term "sexually intimate partner."

Assembly Speaker John A. Perez, D-Los Angeles, joined with a Republican lawmaker to introduce similar legislation.