(CNN) California Gov. Jerry Brown has signed legislation that mandates prison sentences for people who sexually assault unconscious or intoxicated victims, according to his office.

The bill stems from the case of Brock Turner, a former Stanford University swim team member who was sentenced to six months in prison and three months of probation after being convicted of sexually assaulting a 23-year-old unconscious woman in 2015 behind a trash bin on the university campus.

In a statement Friday, Brown said, "As a general matter, I am opposed to adding more mandatory minimum sentences. Nevertheless, I am signing AB 2888 , because I believe it brings a measure of parity to sentencing for criminal acts that are substantially similar."

The Turner case drew national attention after the victim's wrenching impact statement went viral. The brevity of Turner's sentence -- he was released after serving only three months -- triggered outrage against the judge and controversy over how the justice system treats sexual assault survivors.

Judge Aaron Persky.

A jury found Turner guilty in March of three felonies -- assault with intent to commit rape of an intoxicated or unconscious person, penetration of an intoxicated person and penetration of an unconscious person.

The prosecutor asked the judge to give Turner a six-year prison sentence. But Judge Aaron Persky sentenced him to six months in prison and three years probation, giving Turner got credit for jail time served.

The judge said he was following the probation department's recommendation of probation and county jail time, based on Turner's lack of criminal history, his show of "sincere remorse" and the fact that alcohol was involved, impairing his judgment.