California lawmakers on Monday passed a bill that would require prison time for those convicted of sexually assaulting an unconscious victim, an effort inspired by the sentencing of former Stanford swimmer Brock Turner.

The bill received unanimous support in the state assembly, and was also supported by Santa Clara County District Attorney Jeff Rosen. It must still be signed by Gov. Jerry Brown before it becomes law.

Rosen had sought prison time for Turner, who was instead sentenced to six months in jail after he sexually assaulted an unconscious woman in January. The victim read a powerful letter in court about how the crime impacted her life, which was then published by BuzzFeed News.

Turner is expected to be released from jail on Friday after serving half of his sentence.

If the bill is signed into law, it will close a loophole that allowed offenders guilty of rape, sodomy, or other penetration of an unconscious victim to be sentenced to probation, its sponsors said. Previously, prison time was only required in cases of sexual assault where force was used — leaving out cases where a victim could not fight back because they were unconscious or otherwise incapable of giving consent.

Assemblyman Bill Dodd said in a statement the bill aimed to support victims and help change the culture around sexual assault — particularly on college campuses.