TUCSON, Ariz. (Reuters) - An Arizona activist charged with harboring two undocumented migrants was part of a conspiracy to transport and “shield” the men from law enforcement, a prosecutor said on Wednesday at the opening of his trial.

Slideshow ( 5 images )

But a defense attorney for Scott Warren said he gave the men food, water and shelter as part of his work to halt migrant deaths in Arizona’s harsh southern deserts and he was operating “squarely and fully” within the law.

U.S. Border Patrol arrested Warren in a January 2018 raid near Ajo, Arizona, after they found two migrants hiding in a building used by humanitarian groups.

Warren faces three felony counts for allegedly transporting, harboring and hiding the men in a case likely to set a precedent over what aid U.S. citizens can give to illegal border crossers. He faces up to 20 years in prison if convicted on all counts.

Warren was indicted after former U.S. Attorney General Jeff Sessions instructed prosecutors to prioritize cases involving harboring of migrants. There has been a rise in arrests of people for harboring, sheltering or providing aid to migrants since President Donald Trump entered office in 2017, according to data from Syracuse University.

“This case is not about humanitarian aid, or anyone in medical distress,” said Nathaniel Walters, an assistant U.S. attorney. Instead, he said, the case is about an attempt to “shield” two men for “several days” from law enforcement.

Warren is a volunteer for No More Deaths, a group providing water, food and medical aid to migrants crossing Arizona’s southern deserts, where temperatures drop below freezing in winter and exceed 115 Fahrenheit (46 Celsius) in summer.

Over 3,000 migrants have died trying to cross the area since 2001, according to Pima County data.

By taking in the migrants when they showed up at the building, Warren believed he was operating within legal and medical guidelines, his defense lawyer Gregory Kuykendall said.

But Walters said the men had first contacted a mutual acquaintance of Warren, identified as Irineo Mujica. Mujica, a Phoenix-based migrant activist, picked them up at a nearby town and drove them to the “the barn,” Walters said.

Kuykendall said Warren was in contact with Mujica to organize a search for lost or missing migrants and coordinate aid at a Mexico shelter.

Warren was arrested the day that No More Deaths published a video showing Border Patrol agents destroying water supplies it left for migrants. His lawyers argue the arrest was in retaliation for the video.