Legislators vow to change law on rape by impersonation California legislators and the state's top prosecutor said Friday that they would work to overhaul a law that makes it a crime to obtain sex by impersonating another only if the victim is a married woman. The 19th century law required a state appeals court on Wednesday to overturn the rape conviction of a Los Angeles County man who entered a darkened bedroom where a woman was sleeping and had sex with her. The 18-year-old woman said she initially mistook the defendant for her boyfriend, who had left earlier, but resisted when she realized it wasn't him. Police said the defendant admitted the woman probably wrongly assumed he was her boyfriend. The Los Angeles-based 2nd District Court of Appeal said it had ruled reluctantly and appealed to the Legislature to change the law. Another court also put the Legislature on notice of the law's anomaly 30 years ago, but legislators failed to act. Assembly Speaker John A. Pérez (D-Los Angeles) said changing the law would be a top priority for the lower house in this year's legislative session. "We've got to fix this," said Pérez, who has authored proposals to address similar legal loopholes for victims of domestic violence. The goal here is to make sure we have a set of laws that are consistent with what our values are. Assemblyman K.H. "Katcho" Achadjian (R-San Luis Obispo) said prosecutors in Santa Barbara asked him to change the law in 2011 because of their difficulty in prosecuting a man for rape. But his bill to overhaul the law died in the state Senate Public Safety Committee. Lawmakers said they were following a policy to shelve legislation that could exacerbate the state's prison overcrowding crisis by creating new felonies. The current law says sex by trickery is rape only if the victim is married and the man pretends to be her husband. Legal analysts said Wednesday's unanimous ruling by three Republican-appointed justices, two men and one woman, applied the law correctly. "Californians are justifiably outraged by this court ruling, and it is important that the Legislature join together to close whatever loopholes may exist in the law and uphold justice for rape victims," Achadjian said Friday. Assemblywoman Bonnie Lowenthal (D-Long Beach) said she would join Achadjian in introducing a new bill that would expand the definition of rape to include those impersonating the victim's boyfriend, fiance or significant other. "The current definition in state law is a relic from the 1870s," Lowenthal said. Allowing this to stand in the 21st century would be like applying horse and buggy standards to our freeways. State Sen. Noreen Evans (D-Santa Rosa), chairwoman of the Senate Judiciary Committee, also vowed to act. Having sex with an unconscious person is rape. Period," she said. Gen. Kamala D. Harris said the Los Angeles case clearly involved a "non-consensual assault that fits within the general understanding of what constitutes rape. "This law is arcane, and I will work with the Legislature to fix it," she said in a statement issued to reporters.