SAN FRANCISCO -- A federal judge in San Francisco has blocked a California law that allows actors and other entertainment professionals to remove their ages from a popular industry website.

The law that Gov. Jerry Brown signed in September was intended to prevent age discrimination in Hollywood. It affected the website IMDb.com, which provides information about movies, television shows and their casts and crews.

U.S. District Judge Vince Chhabria said Wednesday that the law raised First Amendment concerns by preventing IMDb from publishing factual information on its public website.

Chhabria said the state hadn't shown that the law was necessary to combat age discrimination. He granted IMDb's motion for a preliminary injunction.

The state attorney general's office didn't immediately have comment.