San Francisco — A federal judge has barred LinkedIn Corp. from blocking access to a data analytics startup the professional networking site accuses of unlawfully accessing users’ public profile information.

U.S. District Judge Edward Chen of the Northern District of California Monday issued a preliminary injunction forcing LinkedIn to restore access to hiQ Labs Inc., which until recently was using public data harvested from LinkedIn to create tools for employers to identify valuable workers and map the skills of their workforces.