Stanford student Paul Harrison carries a sign in a show of solidarity during graduation ceremonies at Stanford University.

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.

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.

Santa Clara County Sheriff's Office via AP

Brock Turner

“Sexually assaulting an unconscious or intoxicated victim is a terrible crime and our laws need to reflect that," Dodd said. "Letting felons convicted of such crimes get off with probation discourages other survivors from coming forward and sends the message that raping incapacitated victims is no big deal."

Turner's sentence sparked outrage in California and beyond. More than 1 million people signed an online petition calling for Judge Aaron Persky to be removed from the bench; a formal recall campaign is now underway.

Last week, Persky requested to be transferred to a civil court and will no longer preside over criminal cases.

“Rape is rape, and rapists like Brock Turner shouldn’t be let off with a slap on the wrist,” Assemblyman Evan Low said in a statement. “Judge Persky’s ruling was unjustifiable and morally wrong, however, under current state law it was within his discretion."

The bill retains a provision that allows for judges to use discretion in "unusual cases where the interests of justice would best be served if the person is granted probation." Judges would be required to explain in the court record how a sentence of probation would serve justice.

Rosen, in a statement, thanked state lawmakers and the governor for working to make women in California safer.

"Mostly, we thank Emily Doe for her courageous letter," he said, referring to the victim by a pseudonym. "It gave all of us the inspiration to make sure the next Brock Turner either leaves the next Emily Doe alone, or the next Brock Turner goes to prison."