TUCSON, Ariz. (Reuters) - An Arizona jury on Wednesday found a human rights activist not guilty of harboring two migrants who crossed the U.S.-Mexico border illegally, after the U.S. government prosecuted him for giving them food, water and shelter in the desert.

FILE PHOTO: A yard sign in support of "No Más Muertes/No More Deaths" is displayed in the neighborhood surrounding the Evo A. DeConcini U.S. Courthouse, where humanitarian volunteer Scott Warren faces charges of harboring, and conspiracy to transport undocumented migrants in Tucson, Arizona, U.S. May 29, 2019. REUTERS/Caitlin O'Hara/File Photo

The Tucson jury took just over two hours to decide that Scott Warren, 37, a geography professor, provided the men with legal humanitarian aid in January 2018 and did not deliberately conceal them from U.S. Border Patrol.

An overjoyed Warren hugged supporters who stuck with him through two federal trials. A previous jury was unable to decide whether he broke the law by letting the men stay in a building near Ajo, Arizona, to recover from a two-day trek.

“I love you all,” Warren told his defense team and members of his group No More Deaths (NMD), which leaves water in the desert for migrants. “To those in the desert working on water drops and other aid, I love you too.”

Warren’s case was supported by United Nations officials and Amnesty International who said he was being persecuted for providing aid in the midst of a humanitarian crisis.

The case was an indicator of what assistance humanitarian workers can give undocumented migrants as President Donald Trump makes tougher immigration enforcement a major re-election theme following a surge in apprehensions earlier this year.

Prosecutors accused Warren of shielding the men from the U.S. Border Patrol and giving them directions while they stayed at the ramshackle wooden building known as “The Barn” Jan. 14-17, 2018.

Border Patrol agents had The Barn under surveillance and said that Warren at one point walked outside with the two men and gestured to the north to show them where to go.

“We’re disappointed in the verdict and we have a lot of work to do to keep prosecuting immigration cases,” said Michael Bailey, U.S. Attorney for the District of Arizona.

Warren was arrested on Jan. 17, 2018, at the building in desert around 103 miles (166 km) west of Tucson.

His lawyers said the arrest was in retaliation for a viral video that NMD released the same day showing U.S. Border Patrol agents destroying water supplies it left in the desert.

The two migrants, Kristian Perez-Villanueva, then 23, and Jose Arnaldo Sacaria-Goday, 20, from El Salvador and Honduras respectively, crossed the border and walked nearly 30 miles through the desert before sheltering in the building.

Warren gave the men medical checks, finding both had blisters and scratches, with Sacaria-Goday showing cold-like symptoms and complaining of a bruised upper torso. He said the men needed to recover rather than continue their journey through desert where “people are dying from exposure.”

“We are so grateful that Scott Warren is free,” said Juanita Molina, a Tucson human rights activist who runs the Border Action Network group. “Criminalizing humanitarian aid is against our values as a community.”

Since 2001 the Pima County Office of the Medical Examiner has identified more than 3,000 sets of human remains suspected of belonging to migrants who died in the deserts of southern Arizona.