An American humanitarian aid worker has been found not guilty in a retrial of harboring migrants who crossed the border illegally, in a case that gained international attention and put the spotlight on the Trump administration's crackdown on immigration.

Scott Warren, a geographer from Arizona and longtime volunteer with the aid group No More Deaths, had faced up to 10 years in prison.

"The government failed in its attempt to criminalize basic human kindness," Warren told supporters outside the courthouse on Wednesday after jurors took about two hours to find him not guilty of intentionally harboring and concealing two migrants from Central America.

"Whatever today's outcome had been, our preparation and commitment has impacted change," he added.

Warren was arrested by border agents in January 2018 along with two undocumented migrants from El Salvador and Honduras in a shelter known as "The Barn," used by No More Deaths as a staging ground for water drop-offs in the desert.

Warren's lawyers argued that their client was a law-abiding good Samaritan simply trying to show "basic human kindness" when he helped the two men, who had trekked north through the desert and showed up unexpectedly at the building in Ajo, near the Mexican border.

Scott Warren, a 37-year-old geography teacher and volunteer with the humanitarian group No More Deaths, was acquitted in a retrial
Scott Warren, a 37-year-old geography teacher and volunteer with the humanitarian group No More Deaths, was acquitted in a retrial GETTY IMAGES NORTH AMERICA / JOHN MOORE

"Scott Warren did what all of us should aspire to do: He risked his freedom, he risked his livelihood and he risked his future," attorney Greg Kuykendall told supporters outside the courthouse Wednesday. "All in order to help strangers in distress."

Warren was first tried in June but the jury failed to reach a verdict and the government decided to push ahead with a new trial, while dropping a conspiracy charge.

The case, which drew international attention and prompted vigils across the United States, was widely seen as a test of how far the Trump administration was willing to go in its battle to deter illegal immigration.

Several aid groups welcomed the verdict, with Amnesty International describing it as a "triumph for humanity."

"Sense has prevailed today with the jury exonerating Dr. Scott Warren for a simple reason: humanitarian aid is never a crime," the group said in a statement. "The Trump administration is wrong to try to prosecute people who are only trying to save lives."

Michael Bailey, the top prosecutor in Arizona, said the verdict would not deter his office from going after volunteers who assist migrants.

"We won't distinguish between whether somebody is trafficking or harboring for money or whether they're doing it out of, I would say, a misguided sense of social justice or belief in open borders or whatever," Bailey told the Arizona Republic. "Whatever the reason, if you're harboring or trafficking, we will prosecute when the case comes in."