AJO, Ariz. — Ever since federal agents arrested a local activist for helping two illegal immigrants in this parched desert town near the Mexican border last year, residents are thinking twice about being good Samaritans.

“I guess I’ll have to start asking for ID if I want to give anyone a glass of water,” said Jose Castillo, 80, who has lived his whole life in this former copper mining enclave, where temperatures top 110 degrees in summer.

The retired mechanic belongs to Ajo Samaritans, a local Catholic aid organization that often leaves jugs of water in the desert for Central American migrants who trek over punishing terrain, dotted with cactus and brush, after illegally crossing the Mexican border 43 miles to the south.

“At every community meeting I go to, people now ask if they are going to go to jail for helping the migrants,” Castillo told The Post. “Now, everyone is waiting to see what happens with Scott.”

Local resident Scott Warren, 36, was arrested Jan. 17, 2018, by Border Patrol agents on the outskirts of Ajo, charged with conspiracy to transport and harbor illegal immigrants. Warren claims he was just providing two migrants with food, water and a place to sleep for a few nights.

Earlier this month, a federal jury in Tucson couldn’t reach a verdict after 15 hours of deliberation. Warren, who faces 20 years in jail if convicted, is now scheduled to return to court Tuesday for a status conference. It’s unclear whether the judge will declare a mistrial, order the jury back into deliberations or take some other measure.

Warren’s arrest and trial have become a flashpoint in the debate on the southern border crisis, where thousands of Central Americans and Mexicans have been illegally crossing every day, overwhelming Border Patrol.

Warren is a geography professor who moved to this community of 3,000 in 2013 after completing his PhD dissertation on issues related to migration at the southern border. He became a volunteer with No More Deaths, a Tucson-based non-profit that leaves food and water on dirt trails near the Mexican border. Along with several other volunteers, Warren said, he often walked through the desert leaving jugs of water. At his trial, he said he personally came across the remains of 18 people in the desert.

“People have been giving humanitarian aid for generations in that town,” Warren testified. “I think the best thing about it is that humanitarian aid is legal. That’s recognized all across the globe.”

Since 2000, the remains of more than 3,000 people have been found in the Sonoran Desert, according to No More Deaths.

The Border Patrol agents who arrested Warren said they came across him and the two illegal immigrants — Kristian Gerardo Perez-Villanueva from El Salvador and Arnaldo Sacaria-Godoy from Guatemala — at “the Barn,” a ramshackle house cobbled together out of corrugated aluminum and strips of old plywood on the edge of the desert. No More Deaths has used the house as a staging area in the region and to store supplies of water and canned food.

When The Post recently visited the site, the house was abandoned, with empty plastic gallons of water and cast-off tin cans bleached by the sun littering the surrounding desert.

Border Patrol agents who had been surveilling “the Barn” testified that the migrants they saw with Warren weren’t hungry or thirsty when they found them and didn’t appear to need any aid. A security video from a nearby gas station shows the two illegal immigrants buying food and drinks before arriving at the No More Deaths house, according to court records.

At Warren’s trial, prosecutors said he aided and abetted people who broke the country’s immigration laws and that he participated in “self-described humanitarian groups” that “help aliens illegally enter the United States.” Since 2017, the Department of Justice has ordered federal prosecutors to prioritize “any case involving the unlawful transportation or harboring of aliens.”

Adding to the drama, No More Deaths said Warren’s arrest came hours after the group released a report documenting alleged abuse by Border Patrol officials, including a 2011 video that shows a Border Patrol agent destroying jugs of water. The group says it believes that Warren is being criminally prosecuted in retaliation for the video.

Last week in Ajo, Warren drove down a deserted residential street in a beat-up SUV. He refused comment to The Post.

“I can’t say anything right now,” he said.

Most of the 3,000 residents of the town support Warren, said a reporter for the Ajo Copper News, a weekly. Many have affixed blue and white signs, featuring a drawing of a water jug, with the slogan, “Humanitarian Aid is Never a Crime. Drop All Charges.”

Migrants in this remote part of Arizona, where many “snowbirds” from the US and Canada spend their winters, are not new. For decades, Mexicans crossed the border to work alongside local residents and members of the nearby Totono O’odham tribe in Ajo’s mine, the state’s first open-pit copper mine. The mine, which opened in the 1880s, shut down in 1985.

In July 1980, dozens of volunteers fanned out over a 500-square mile area to save a group of Salvadoran illegal immigrants who had been abandoned in the desert by a coyote, Latin American slang for “smuggler.” They went on foot, horseback, in pick-ups and even helicopters and airplanes under a blazing summer sun, Castillo recalled. They saved most of the migrants, although 13 others, mostly women, died in the desert.

“Everyone in town mobilized to find them,” said Castillo, who was part of the search. “We didn’t ask where they came from, we just did everything we could to save them because a life is a life is a life is a life.”