Voters in a county in the state of California on Tuesday removed from office a judge widely criticised for showing leniency to a rapist, BBC reported. Judge Aaron Persky handed Stanford University swimmer Brock Turner a six-month sentence in June 2016 for sexually assaulting an unconscious woman.

Turner, who was released after serving half of his six-month term in September 2016, will remain on probation till next year and will be a registered sex offender for the rest of his life.

The verdict was the result of a legal loophole that allows for lenient sentences if a victim of sexual assault is found to have not resisted the attack. It has since been closed by voters.

The election to decide on Persky’s removal was held after a petition on the matter gathered enough signatures. County judges in California are elected by voters. Persky is the first judge to be unseated by US voters since 1977, and the first in California since 1932, The Guardian reported.

The campaign to recall the judge said the voters of Santa Clara were the winners. “We voted today against impunity for high status perpetrators of sexual assault and domestic violence,” the chair of Recall Persky, Michelle Dauber, said.

Persky has not expressed any regret about the case, and recently said that he had been bound by sentencing and probation guidelines. Judges should adhere to “the rule of law and not the rule of public opinion”, he said. The California Commission on Judicial Performance has cleared him of misconduct.

Persky was criticised for sympathising with Turner during sentencing, saying: “A prison sentence would have a severe impact on him.” Turner’s father was also criticised for lamenting that his son was facing consequences for “20 minutes of action”.