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.