Judge Vince Chhabria, U.S. District Court for the Northern District of California Jason Doiy / The Recorder

SAN FRANCISCO — A federal judge on Tuesday lambasted the California Attorney General’s Office over harassing discovery requests in a lawsuit involving entertainment database company IMDb.com Inc.

U.S. District Judge Vince Chhabria said it was “an outright abuse of power” for the AG to request information about IMDb.com’s lobbying efforts and its communications with amici who have backed its First Amendment challenge against a state law limiting the site’s ability to publish ages of actors and others in Hollywood,

“It’s one thing for a Legislature to enact a speech restriction without an adequate justification. That sometimes happens,” wrote Chhabria in a five-page order issued Tuesday. “It’s another thing for the government’s lawyers to double down on their client’s constitutional error by imposing irrelevant, burdensome, even harassing discovery obligations on a party that seeks only to vindicate its First Amendment rights in court. That should never happen,” the judge wrote.

Chhabria previously issued a preliminary injunction in February blocking the law, AB 1687, which the Legislature passed last year with the aim of curbing age discrimination in Hollywood. Chhabria found that the law violated the First Amendment by preventing IMDb.com from publishing factual information and that it would likely do little to actually combat age bias in the entertainment industry.

At a hearing prior to his injunction ruling, Chhabria warned the state’s attorneys that it was extremely unlikely that discovery would turn up anything that would change his mind about the law’s constitutionality. Chhabria ordered the state’s lawyers defending the law to submit drafts of any discovery requests they might want to serve on IMDb.

Tuesday’s order from Chhabria comes after the state’s lawyers asked to query the company for more information about how the company gathers age and birthdate information and responds to request to take down age information.

“The government’s theory is that IMDb’s responses to these requests may reveal that people in the entertainment industry use information from IMDb.com to commit age discrimination,” Chhabria wrote. “The idea that such information would be unearthed by these particular discovery requests is, to put it charitably, fanciful.”

The AG’s Office did not immediately respond to a request for comment.