The first jury that heard Scott Warren’s case earlier this year could not agree. Should he should face prison time for helping migrants who had crossed the border into the United States?

Federal prosecutors had charged the 37-year-old with illegally harboring two Central Americans at a camp in southern Arizona. Warren’s lawyers, however, argued he had merely offered them basic necessities for survival — part of his humanitarian efforts to help migrants making the treacherous trek across the Sonoran Desert.

On Wednesday, however, it took only two hours for a different jury in Tucson to come to a definitive conclusion: Warren, a geography teacher who has since emerged as a symbol of the Trump administration’s crackdown on border activists, was found not guilty.

“This jury understood that Scott’s purpose had nothing to do with illegality,” his lawyer, Gregory J. Kuykendall, told The Washington Post. “Scott’s purpose was to keep people safe — people who otherwise stood a good chance of dying.”

Outside the U.S. District Court on Wednesday afternoon, Warren cheered the victory, saying it would allow him and the group he works with, No More Deaths, to continue offering clothing, food and shelter to migrants.

“The government has failed in its attempt to criminalize basic human kindness,” he told a crowd of supporters.

The verdict in Warren’s highly publicized trial marks the peak of a months-long legal saga, after he was arrested nearly two years ago by U.S. agents at an aid station run by No More Deaths.

Known as “the Barn,” the station is located near the tiny town of Ajo, Ariz., about 40 miles north of the border and almost 130 miles west of Tucson. Warren and other volunteers would meet there to haul jugs of water and buckets of first-aid supplies into nearby mountains and canyons.

When they received reports that someone had gone missing, No More Deaths sent volunteers on search-and-rescue missions to offer emergency aid or, in the worst of cases, recover bodies. Between 1998 and 2017, the remains of more than 7,000 people have been found along the U.S.-Mexico border, including nearly 3,000 in southern Arizona, according to U.S. Border Patrol, though experts say both of those figures are low.

Those deaths have been linked to a 1994 Border Patrol policy implemented under President Bill Clinton, known as “Prevention Through Deterrence,” which closed off high-traffic crossing points along the border to discourage illegal immigration.

But the policy didn’t keep migrants from crossing, Kuykendall said. It simply pushed them to more treacherous points along the border.

That may be where two migrants, Kristian Perez Villanueva of El Salvador and Jose Sacaria Goday of Honduras, entered the United States in January 2018 before trekking through the desert to a gas station. A migrants’ rights organizer saw the men and offered to shuttle them to a better location, dropping them off at the Barn, The Washington Post’s Isaac Stanley-Becker reported.

No one was on the premises. But when Warren discovered the men less than an hour later, they asked for food, water and a place to rest, according to court records. He gave them clean clothes, offered them beds and fed them, lawyers say, but never hid them or encouraged them to make an unlawful entry.

All the while however, Border Patrol agents had been staking out the Barn. They had been tipped off by an anonymous Arizona resident, who suspected the group was harboring undocumented immigrants, the Associated Press reported.

When agents noticed Warren speaking with the two migrants, they arrested all of three men. Perez Villanueva and Sacaria Goday were both deported, while Warren was charged with two felony counts of harboring and conspiring to transport undocumented immigrants.

At his first trial in June, a jury spent days parsing through the details and debating whether Warren had knowingly helped the men hide from Border Patrol. Four jurors were sure he had and insisted on a guilty verdict. Another eight wanted to see Warren go free. Faced with a deadlock, a judge eventually declared a mistrial.

Prosecutors repeated their claims at his new trial, which started last week. Nathaniel Walters, an assistant U.S. attorney, challenged Warren’s claim that he was “orienting” the men, pointing out the two migrants didn’t need medical attention.

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

Kuykendall, however, argued that it was not illegal to help migrants if it’s not for an illegal purpose. Warren’s work on the border was being guided by neutrality, he said, and his only goal was to save lives.

“This is a place where a humanitarian crisis of epidemic proportions is occurring,” Kuykendall told The Post. “People who exercise the golden rule, people who are Samaritans, are not committing crimes. They are doing what all of us should aspire to.”

During the trial, prosecutors successfully asked U.S. District Judge Raner Collins to bar the defense from mentioning President Trump or his policies during the trial.

Kuykendall disputed the request, charging that Warren had been charged in part because of the Trump administration’s policies. In 2017, then-Attorney General Jeff Sessions had ordered federal prosecutors to step up their enforcement of the harboring statute, telling them to pursue “any case involving the unlawful transportation or harboring of aliens.”

On the felony charges, however, the jury sided with the defense.

Michael Bailey, the U.S. attorney for Arizona, vowed to continue prosecuting people who harbor and smuggle migrants.

“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 told the AP.

Warren, meanwhile, preached the importance of exchanging dialogue on such a divisive issue.

“Part of our work here has been to educate, to explain the complicated context of the border with clarity,” he said outside the courthouse, vowing to listen to those on the opposite side of the debate: “I hope they know that I have much to learn from their perspectives, experiences and frustrations as well.”

Just hours earlier, another high-profile legal saga over migrants on the Arizona border also reached its conclusion.

In the same courthouse, just two floors down, former Border Patrol agent Matthew Bowen was sentenced to three years of probation and supervised release. In a plea deal, Bowen admitted he had intentionally run over a Guatemalan migrant with his truck — and then lied about it.