TUCSON, Ariz. — An activist was quickly acquitted Wednesday on charges he illegally harbored two Central American immigrants at a camp in southern Arizona operated by a humanitarian group.

The verdict by a jury in U.S. District Court came after jurors deliberated for about two hours in what was the second trial for Scott Warren. A mistrial was declared last June after a jury deadlocked on harboring charges.

Warren was stoic after the verdict was read. "The government failed in its attempt to criminalize basic human kindness," Warren said outside of court.

The jury’s quick decision came in contrast to Warren’s last trial, when jurors deliberated for several days before calling it quits over a lack of consensus.

Greg Kuykendall, an attorney who defended Warren, said the new jury followed the law carefully.

"They parsed the evidence," he said. "They paid rapt attention while we were putting on our defense and while the prosecution was putting on its case, and they decided that humanitarian aid is not always a crime, the way the government wanted it to be."

Warren, 37, testified that neutrality guides his work near the border and denied he has ever helped migrants hide or instructed them how to avoid authorities.

Scott Warren, right, a volunteer for the humanitarian aid organization No More Deaths speaks with student volunteers delivering food and water along remote desert trails used by undocumented immigrants on May 10, 2019 near Ajo, Ariz. John Moore / Getty Images file

Warren was arrested in January 2018 by U.S. agents who were staking out a humanitarian aid station in Arizona known as "The Barn," where two Central American men had been staying for several days.

Prosecutor Nathaniel Walters said the men didn’t need medical attention and questioned the authenticity of Warren’s claim that he was "orienting" them before they left the camp.

The camp is run by a group that tries to prevent immigrants from dying in the desert.

"What they needed was a place to hide, and that’s what the defendant gave them, and that is an intent to violate the law," Walters said.

Warren, a member of the group No More Deaths, says the group’s training and protocol prohibit advising migrants on how to elude authorities. He said his interest is in saving lives.

"We need to work within the spirit of humanitarian aid and within the confines of the law," Warren said.

Michael Bailey, the U.S. attorney for Arizona, said he was disappointed with the verdict, but promised to continue prosecuting people who harbor and smuggle immigrants and those who sneak across the border.

"We won't distinguish between whether somebody is trafficking or harboring for money, or whether they're doing it out of, you know, what I would say a misguided sense of social justice or belief in open borders or whatever," Bailey said.

Kuykendall said his client did what everyone should aspire to do. "He risked his freedom, he risked his livelihood and he risked his future, all in order to help strangers in distress," Kuykendall said.

Warren and his supporters say President Donald Trump’s administration has increasingly scrutinized humanitarian groups that leave water in the desert and conduct search and rescue operations when they are asked to help find a missing migrant.

The federal judge overseeing the trial barred Warren from mentioning the president.

The Border Patrol had been investigating The Barn for months, according to documents released after news outlets sued to obtain them.

The documents show that in April 2017, an anonymous Arizona resident told Border Patrol officials that he suspected members of the group were harboring immigrants in Ajo. About three months later, officials detained members of the group No More Deaths on suspicion of vandalizing a camera at Cabeza Prieta National Wildlife Refuge, where they regularly left water jugs.

In November 2017, agents interviewed residents who said they had noticed more traffic and littering outside The Barn.

Agents eventually encountered a man who said he had traveled across the desert with two other men who were picked up by a van.

Suspecting they might be at the No More Deaths building, agents began watching it on Jan. 17, 2018, arresting Warren and the two migrants. The men were deported after providing video testimony.

Thousands of immigrants have died crossing the border since the mid-1990s, when increased enforcement pushed many to Arizona's scorching desert.