A US jury could not reach a verdict on Tuesday against a border activist who, defense attorneys say, was simply being kind by providing two migrants with water, food and lodging when he was arrested in early 2018.

Scott Daniel Warren, a 36-year-old college geography instructor, was charged with conspiracy to transport and harbor migrants in a trial that humanitarian aid groups said would have wide implications for their work. He faced up to 20 years in prison.

Prosecutors maintained the men were not in distress and Warren conspired to transport and harbor them at a property used for providing aid to migrants in an Arizona town near the US-Mexico border.

The case played out as humanitarian groups say they are coming under increasing scrutiny under Donald Trump’s hardline immigration policies.

Outside the courthouse, Warren thanked his supporters and criticized the government’s efforts to crack down on the number of immigrants coming to the US.

“Today it remains as necessary as ever for local residents and humanitarian aid volunteers to stand in solidarity with migrants and refugees, and we must also stand for our families, friends and neighbors in the very land itself most threatened by the militarization of our borderland communities,” Warren said.

Glenn McCormick, a spokesman for the US attorney’s office in Arizona, declined to comment on whether Warren would face another trial. The judge set a 2 July status hearing for the defense and prosecution.

Migrants, apprehended after illegally crossing along the US-Mexico border in Arizona are lined up. Scott Daniel Warren faced charges for providing migrants with water, food and lodging. Photograph: AP

Warren is one of nine members of the humanitarian aid group No More Deaths who have been charged with crimes related to their work. But he is the only one to face felony charges.

In west Texas, a county attorney was detained earlier this year after stopping her car on a dark highway to pick up three young migrants who flagged her down. Teresa Todd was held briefly, and federal agents searched her cellphone.

Border activists say they worry about what they see as the gradual criminalization of humanitarian action.

Warren has said his case could set a dangerous precedent by expanding the definition of the crimes of transporting and harboring migrants to include people merely trying to help border-crossers in desperate need of water or other necessities.

Warren and other volunteers with the No More Deaths group also were targeted this year in separate federal misdemeanor cases after leaving water, canned food and other provisions for migrants hiking through the Cabeza Prieta national wildlife refuge in southern Arizona.

In Warren’s felony case, the defense team headed by Greg Kuykendall argued that Warren could not, in good conscience, turn away two migrants who had recently crossed the desert to enter the US.

Jurors said on Monday that they could not reach a consensus on the charges against Warren, but a federal judge told them to keep deliberating. They were still deadlocked on Tuesday and ultimately dismissed.

Thousands of migrants have died crossing the border since the mid-1990s, when heightened enforcement pushed migrant traffic into Arizona’s scorching deserts.