A federal judge has blocked a California law that would have forced IMDB to take down actors' ages on request.
The law was signed by Governor Jerry Brown, a Democrat, in September 2016. It was supported by the Screen Actors Guild, which said the law it would help prevent age discrimination in film and television hiring.
IMDB quickly challenged the law in court, saying that it "attempts to combat age discrimination in casting through content-based censorship."
IMDB is widely used by the public for free. It also sells subscriptions to industry professionals, offering directories and resume tools, for $150 per year. The law would have allowed paid subscribers to ask that their ages be removed.
Judge Vince Chhabria ruled for IMDB on Tuesday and blocked the state from enforcing the law. He had already suspended the law while the case went through court.
Related: IMDb will have to remove actors' ages under new law
In his order, Chhabria called the law "clearly unconstitutional." He said it "singles out specific, non-commercial content — age-related information — for differential treatment."
The judge also said that even if the defendants, the state of California and the Screen Actors Guild, demonstrated a casual link between the availability of ages on IMDB and age discrimination, it would not be enough to justify a "content based restriction on IMDB's speech."
Chhabria added that "regulation of speech must be a last resort."
SAG-AFTRA said it was "extremely disappointed" with the ruling.
"The Court unfortunately fails to understand or recognize the massive impact gender and age discrimination has on all working performers," Duncan Crabtree-Ireland, the chief operating officer and general counsel, said in a statement. "That discrimination is facilitated by IMDB's insistence on publishing performers' age information without their consent."
Crabtree-Ireland said SAG-AFTRA would appeal.
Related: Cate Blanchett on the Hollywood pay gap
SAG-AFRTA has long been in favor of the law. SAG-AFTRA President Gabrielle Carteris said when it passed that the organization had tried for years "to stop the career damage caused by the publication of performers' dates of birth" on websites like IMDB and StudioSystem.
A month earlier, the "Beverly Hills, 90210" actor wrote in a column for The Hollywood Reporter that she would have never been asked to audition for the '90s drama if casting directors knew she was significantly older than her character.
Neither IMDB nor the California attorney general's office responded to a request for comment from CNN on Wednesday.