Berkeley activists can sue federal agents for their role in a 2008 raid in which officers seized their computers and records in search of alleged threats by animal-rights advocates, a federal judge ruled Monday.

The activist group Long Haul Inc. can try to prove that the search of its Berkeley offices exceeded legal boundaries, that agents misled the judge who issued a search warrant and that it was targeted because of its left-wing views, said U.S. District Judge Jeffrey White.

An unaffiliated group with offices in the same Berkeley building, East Bay Prisoner Support, also won the right to sue on the same grounds.

Both groups have also sued the University of California, whose police were involved in the raid. The university did not join the federal government's attempt to dismiss the suit.

Long Haul operates a bookstore, public computer terminals and meeting rooms at a storefront on 3124 Shattuck Ave. A judge approved the search warrant in August 2008 after a UC police detective said threatening messages to animal researchers at UC Berkeley two months earlier had been sent from a computer at the storefront.

UC police, two federal agents and other officers entered the building the next day while it was closed. The suit said they had broken into locked doors and cabinets, seized all 14 computers in the building, combed through library and bookstore records, and taken computer drives and other items from both Long Haul and East Bay Prisoner Support, which was not named in the warrant.

The suit said officers had no evidence that either group was involved in illegal acts and had failed to tell the judge that both groups publish newspapers, a status that requires special justification for law enforcement searches.

In seeking dismissal, the federal government said its officers had believed that tracing the threats and seizing the records was necessary to prevent serious harm.

But White said that argument depends on disputed facts he can't resolve at this stage, and that the two-month interval between the messages and the raid weakens the government's claim of an emergency.

White, an appointee of former President George W. Bush, said the two groups could also sue the government for allegedly violating their right of free speech, but must present evidence that officers had been motivated by the groups' political views.