A federal judge in San Jose on Monday sent mixed signals over the fate of a new law designed to target violent animal-rights protests, indicating he will rule later in the nation’s first direct legal challenge to Congress’ attempt to protect animal researchers and scientists from serious safety threats.

During an hourlong hearing, U.S. District Judge Ronald Whyte suggested that the 2006 Animal Enterprise Terrorism Act may be legally vulnerable, but he also left doubts about whether the current lawsuit is the right path to take on the law in its entirety.

Federal prosecutors invoked the law for the first time earlier this year, indicting four activists accused of threats and vandalism against University of California medical researchers in Santa Cruz and Berkeley.

Lawyers for the defendants, backed by civil liberties groups, argue that the animal terrorism law is unconstitutional. They say it’s too broad, vague and tramples on the free speech rights of animal rights advocates who protest and boycott for their cause. In moving to dismiss the indictment, they maintain the law targets animal rights groups so broadly that it would criminalize a boycott or protest outside a fur store.

At one point, Whyte asked attorneys for the activists: “Essentially, your position is that if picketing or boycotting is particularly effective, it’s going to be a violation of the statute?”

Attorney Kali Grech told the judge the law is even more sweeping than that.

“This is clearly the regulation of ideas,” she said.

Justice Department attorneys defend the law, saying it is constitutional and punishes violent and threatening conduct, not speech. The law makes it a crime to interfere with an “animal enterprise” through threats that put someone in fear of death or serious injury.

Assistant U.S. Attorney Elise Becker told Whyte that the allegations of violence against the four activists go far beyond boycotting a business or protesting for animal rights.

“The Supreme Court has consistently found that threats are not protected speech,” Becker said.

Congress enacted the legislation, which was pushed by Sen. Dianne Feinstein, D-Calif., in the wake of a number of violent protests at California research facilities.

Federal prosecutors in March unveiled an indictment charging Joseph Buddenberg, Maryam Khajavi, Nathan Pope and Adriana Stumpo, alleging they were responsible for a series of threatening protests against Bay Area researchers and their families.