A man stands in front of a border fence that divides a beach near Tijuana, Mexico, this month. (Spencer Platt/Getty Images)

A FEW weeks ago, federal prosecutors in Arizona secured a conviction against four humanitarian aid workers who left water in the desert for migrants who might otherwise die of heat exposure and thirst. Separately, they dropped manslaughter charges against a U.S. Border Patrol agent who fired 16 times across the border, killing a teenage Mexican boy. The aid workers face a fine and up to six months in jail. The Border Patrol officer faces no further legal consequences.

That is a snapshot of twisted frontier justice in the age of Trump. Save a migrant’s life, and you risk becoming a political prisoner. Kill a Mexican teenager, and you walk free.

The four aid workers, all women, were volunteers in service to an organization, No More Deaths, whose religious views inform its mission to prevent undocumented migrants from dying during their perilous northward trek. They drove into the Cabeza Prieta National Wildlife Refuge, about 100 miles southwest of Phoenix, to leave water jugs along with some canned beans.

The women — Natalie Hoffman, Oona Holcomb, Madeline Huse and Zaachila Orozco-McCormick — made no effort to conceal their work. Confronted by a U.S. Fish and Wildlife Service officer, they said they believed everyone deserved access to basic survival needs. One of them, Ms. Orozco-McCormick, compared the wildlife refuge to a graveyard, such is the ubiquity of human remains there.

Since the turn of the century, more than 2,100 undocumented migrants have died in that sun-scorched region of southern Arizona, according to Humane Borders, a nonprofit group that keeps track of the numbers. Last year, according to the Pima County Medical Examiner’s Office, the remains of 127 dead migrants were recovered there.

In the past, prosecutors declined to press charges against the volunteers who try to help by leaving water and canned food in the desert. But the four women, arrested in August 2017, were tried for the misdemeanor offenses of entering a refuge without a permit, abandoning personal property and, in the case of Ms. Hoffman, driving in a restricted area. U.S. Magistrate Judge Bernardo Velasco, who presided over the bench trial, said their actions ran afoul of the “national decision to maintain the Reserve in its pristine nature.”

In fact, prosecutors have broad discretion in deciding whether to press such minor charges — just as they do in more consequential cases such as the manslaughter charge against Lonnie Swartz, the Border Patrol agent who killed 16-year-old José Antonio Elena Rodríguez in October 2012. According to Mr. Swartz, he opened fire on the boy, shooting 16 times in what the agent said was self-defense, through the fence that divides the city of Nogales along the Arizona-Mexico border. He said the boy had been throwing stones at him across the frontier.

Mr. Swartz was acquitted on second-degree murder charges last spring, but the jury deadlocked on manslaughter charges. In a second trial, last fall, the jury also failed to reach a verdict on manslaughter. Last month, prosecutors declined to seek a third trial.

While the aid workers seek to avoid prison time, Americans may well wonder about a system in which justice is rendered so perversely.