PLYMOUTH, N.H. — The American Civil Liberties Union called Thursday for a court in New Hampshire to suppress evidence against 18 people charged with drug possession after being stopped by Customs and Border Protection agents last summer.

The group was arrested on Interstate 93 in Woodstock at two checkpoints after searches uncovered mostly small amounts of marijuana and other narcotics as part of what authorities said was a search for people living in the country illegally. The drugs were handed over to local police because the amounts confiscated didn’t meet the federal threshold for prosecution. The suspects, 16 of whom were in court Thursday, didn’t address the judge nor did they speak to reporters.

The agents stopped dozens of cars about 90 miles from the Canadian border, which they were allowed to do since authorities can set up checkpoints within 100 miles of any U.S. “external boundary.”

The ACLU told Plymouth District Court Judge Thomas Rappa that New Hampshire’s Constitution is more protective of privacy than the U.S. Constitution, and that evidence from federal searches can’t be used in state prosecutions if it was gathered in a way that violates the state constitution.

“What this case is about, what this motion to suppress is about at the end of the day is the integrity of the New Hampshire Constitution and the principle that the New Hampshire Constitution provides greater search and seizure rights to defendants than the Fourth Amendment,” Gilles Bissonnette, the ACLU’s legal director, told the court. “If the state chooses to prosecute a person in state court under our state’s laws based on evidence seized in New Hampshire, that seizure must comply with the New Hampshire Constitution.”

Gabriel Nizetic, who is representing the state, insisted the seizures didn’t violate the Fourth Amendment prohibiting unreasonable searches and seizures, which he argued, applied in this case. He noted that the federal authorities were in charge of the stops and that everything that occurred including using dogs to identify the suspected vehicles complied with the Fourth Amendment.

“What is at stake here is not the integrity of the New Hampshire Constitution. What is at stake here is the integrity of the United States Constitution,” Nizetic told the court. “It is the United States Constitution that controls these particular cases. These are federal agents working for a federal agency performing a federal function in the federation of states.”

The courts have addressed this issue in other border states, mostly notably in New Mexico, Washington and Arizona. In New Mexico, the state’s highest court ruled in 2015 that the state’s protections against search and seizure do not apply at international border checkpoints. The five-member panel made the distinction in overturning a previous ruling made by an appeals court in a 2012 drug smuggling case. In the opinion, Justice Edward L. Chavez wrote the state law does not mean greater protections against searches at an international border checkpoint.

The hearing Thursday mostly centered on the role of the border agents at these stops.

The ACLU repeatedly questioned several agents who worked the checkpoints over the intention of the stops, with much of their focus on the dogs that were used to identify suspicious cars. The agents insisted they were there to find people in the country illegally and were concealed in the cars, but admitted they had found only drugs. The ACLU also highlighted the fact that these were warrantless searches done without the consent of the suspects, and that agents were doing searches that Woodstock police officers standing nearby weren’t allowed to do.

Rappa said he would take the case under advisement, though at one point he appeared sympathetic to the ACLU position. He asked Nizetic why the agents didn’t limit their searches to concealed individuals if that was the reason for the checkpoints. And when “nobody jumps out of the trunk or from under the hood, that’s it. That’s the extent of it.”

Nizetic said they could have done that but chose to go further — in many cases when they smelled marijuana in the vehicles.