It was a successful operation for the U.S. Customs and Border Protection Agency: 25 undocumented immigrants stopped and detained by agents on Interstate 93 South in Woodstock, and 32 U.S. citizens arrested, most on drug possession charges.

In total, two pounds of marijuana and a host of other drugs were recovered during the stops.

But following the arrests, conducted over three days at a highway checkpoint on a summer weekend in the scenic White Mountains, legal experts are questioning whether the drug searches will hold up in court. And immigration advocates are objecting that the checkpoint was set up in the first place.

The arrests swept up two groups of defendants – those without documentation, processed and then turned over to U.S. Immigration and Customs Enforcement (ICE) and those with U.S. citizenship, arrested by the Woodstock Police Department.

Neither the Border Protection Agency nor ICE would disclose the names of the detained undocumented immigrants, citing their departments’ policies. Woodstock police released the names of the U.S. citizens Friday; 18 were arrested on drug possession charges.

But absent full details, lawyers say each category of arrests raises distinct concerns.

At the start of the debate, lawyers say, is the legal authority for the checkpoint itself. The Border Patrol has had the authority to conduct internal border checks since a law passed Congress in 1946; in 1953, a federal regulation defined the acceptable zone as 100 miles from the border. That effectively encompasses all of New Hampshire, according to the American Civil Liberties Union (ACLU).

The authority was upheld most crucially in the 1976 Supreme Court decision of U.S. v Martinez-Fuerte. But the ACLU has objected to that decision for decades.

Responding to the checkpoint, Gilles Bisonnette, legal director at the ACLU of New Hampshire, called the checkpoint an unconstitutional breach of search and seizure protections.

“The ACLU believes that these checkpoints amount to dragnet, suspicionless stops that cannot be reconciled with Fourth Amendment protections,” he said in a statement.

Then there are the drug possession arrests. At particular issue, lawyers say, is the manner in which the cars were searched for narcotics. With drivers backed up in line for an immigration status check, agents patrolled between the lanes with drug-sniffing dogs, according to Woodstock police Chief Ryan Oleson, whose officers were there to assist. When a dog “alerted” next to a car, officers diverted the car to a special checkpoint area, and the car was searched.

The method worked: aside from the marijuana, police touted their seizure of small amounts of cocaine, psilocybin mushrooms and hash oil. But the approach could create complications that might lead to the incriminating evidence being dismissed, according to University of New Hampshire law professor Albert “Buzz” Scherr.

“There’s nothing about just the fact that they’re doing the checkpoint that is necessarily, obviously illegal,” he said. “But the use of drug sniffing dogs changes the dynamic.”

Central to the legal question is whether officers had the authority to walk the dogs near a car without establishing a reasonable suspicion that drugs might be found, Scherr said. The answer may not be so simple, given a fundamental divide over the use of drug dogs under New Hampshire and federal law.

It starts with the Fourth Amendment. The U.S. Supreme Court has set clear prohibitions against the search of vehicles without probable cause or reasonable suspicion. But the court has also made exceptions for the use of drug sniffing dogs outside cars, Scherr explained – dogs may be freely used, providing that they don’t prolong the reason for the traffic stop in the first place. And dogs that “alert” create probable cause to search the car, courts have held.

New Hampshire has taken a different track. In 1990, the state Supreme Court held that probably cause must be established before the dog is walked near the car, not after the dog alerts to the drugs. The case, State v. Pellicci, found that vehicle drug sniff tests are only valid as “part of an investigative stop based on a reasonable and articulable suspicion of imminent criminal activity involving controlled substances.”

Scherr added that the reasonable suspicion must be tailored to each vehicle. “It’s got to be related specifically to that car,” he said.

Absent that suspicion, all evidence collected and actions taken after the dog alerted could be deemed inadmissible due to a legal doctrine known as “fruit of the poisonous tree,” Scherr said.

New Hampshire is one of only a handful of states whose courts have taken the opposite approach to federal law, according to Scherr. The state’s courts have long set higher standards for Fourth Amendment questions than the rest of the country, he added.

Ron Abramson, a Manchester immigration lawyer, agreed with Scherr’s interpretation of New Hampshire’s search laws.

But the Customs and Border Protection agency says the actions it took are standard and comport with federal law.

Stephanie Malin, New England Public Affairs Officer for the agency, said Border Patrol was using the dogs primarily to detect human trafficking; the drug searches were incidental to the purpose of the stop, she said.

“We utilize canines as a key asset to identify instances of human smuggling which falls under the immigration mission,” she said, “but because our canines are dual-trained on the scents of both concealed humans and narcotics, when a canine alerts, the agents must conduct a search to determine the nature of the source of the alert.”

If agents discover a violation of federal law, they will take action as appropriate, Malin added. And she said that New Hampshire law would not have legal bearing on the agents.

“(Customs and Border Protection) checkpoints operate under federal authority and (are) consistent with federal immigration law regardless of the state in which they are being run,” she said.

The checkpoint and subsequent detentions, which grabbed headlines Monday, took drivers by surprise.

Unlike a DWI checkpoint that is announced ahead of time and requires a court order, no announcement was made prior to the weekend roadblock and no judge signed off in approval. The governor’s office was not notified ahead of time and did not approve, a spokesman said Wednesday.

Shipp Webb of Sanbornton said he’s driven along the route for 10 years, on his way to hike in the White Mountains. On Aug. 25, Webb was taken aback when an officer with the department stopped his car and asked his citizenship.

“It just felt very strange to just be driving around on Friday afternoon and then suddenly be questioned by federal agents,” he said, adding that he thinks the stops are intimidating and unnecessary.

But the Woodstock police chief said his department has assisted Border Patrol in similar operations at the same stretch of the interstate since the 1980s. The agency had stopped the practice in July 2012 due to funding and manpower constraints, Malin said.

Since the beginning, Oleson said, use of the dogs has been standard.

“It’s the same routine procedure that I remember from decades ago,” he said.

Malin did not specify whether border checks will continue in New Hampshire, saying those decisions are determined by resources. And Bissonnette said that the organization is researching the law to look for potential legal action, but that it has not made a decision yet.

But beyond the specific legal concerns, Abramson said he opposes the federal agency’s blanket approach, calling it unjust for the families of those detained.

“What’s problematic from my perspective is the apparent lack of discretion on the part of law enforcement,” he said. “Just because you’re authorized to do something, doesn’t mean it’s a sound public policy or otherwise beneficial or correct decision.”