SACRAMENTO, Calif. (Reuters) - California Governor Jerry Brown on Wednesday signed a bill to end the statute of limitations for rape, a measure inspired by accusations against comedian Bill Cosby, some of which surfaced decades after alleged crimes occurred.

Actor and comedian Bill Cosby arrives for a Habeas Corpus hearing on sexual assault charges at the Montgomery County Courthouse in Norristown, Pennsylvania, July 7, 2016. REUTERS/Mark Makela/File Photo

Cosby, who built a long career on family friendly comedy, including his long-running NBC sitcom “The Cosby Show,” has steadfastly denied ever assaulting anyone and has insisted that all his sexual encounters were consensual.

He is charged in Pennsylvania with drugging and sexually assaulting a former Temple University employee, Andrea Constand, at his home in 2004. In California, he faces a civil suit by a woman now in her 50s who alleges that Cosby plied her with alcohol and molested her in 1974 at the Playboy Mansion when she was aged 15.

Existing California law generally limits prosecution of a felony sexual offense to 10 years after the offense is committed.

Only two in 100 rapists will be convicted of a felony and spend any time in prison, according to the U.S. Department of Justice.

“Governor Jerry Brown’s signature of SB 813 tells every rape and sexual assault victim in California that they matter and that, regardless of when they are ready to come forward, they will always have an opportunity to seek justice in a court of law,” said bill author Senator Connie Leyva.

“Rapists should never be able to evade legal consequences simply because an arbitrary time limit has expired,” she said.

The bill will not work retroactively and will not help some of Cosby’s accusers, according to Gloria Allred, an attorney who represents several of the comedian’s alleged victims.

The governors of Nevada and Colorado have signed similar bills extending the statute of limitations to 20 years for rape cases into law.

The California law takes effect on Jan. 1, 2017.