Blocks from the U.S. border in Tijuana sits the shrine of Juan Soldado (“Soldier Juan”)—local hero turned patron saint of undocumented migrants. His followers, who have decorated the shrine with candles, flowers, and photocopied green cards, credit him with miracles: blinding Border Patrol agents, guiding migrants through the desert, granting unlikely asylum applications. (The green-card copies are from successful emigrants who later returned to leave proof that their prayers had been answered.)

In 1938, the year Juan Soldado died, Tijuana was in crisis. The Americans who had once frequented the city’s cantinas and casinos were no longer coming, thanks to Prohibition’s end and a new casino ban. Soaring unemployment, exacerbated by mass deportations from the U.S., fueled unrest. When an 8-year-old girl was raped and murdered, the city erupted in rage. A suspect—or scapegoat—was promptly identified: army Private Juan Castillo Morales. With mobs threatening to lynch him, a military tribunal tried him in a single night, not stopping to check his fingerprints against crime-scene evidence. He was condemned to death by ley de fuga, a cruel ritual that compelled him to run toward the border while being targeted by a firing squad. Before he could reach U.S. soil, he was fatally shot in the back. When sympathizers tried to clean his blood off the ground, it could not be removed. Declaring this a miracle, they built a shrine atop his grave.

For decades after his death, Juan Soldado was relatively unknown, particularly outside Tijuana. But as emigration from Latin America to the U.S. increased in the late 20th century, the San Diego–Tijuana border became one of the most protected in the world. Since then, thousands of northbound migrants have arrived in Tijuana each year, only to hit a literal wall. While waylaid, many discover Juan Soldado’s shrine; when they later continue their journey, they take his story with them.

Over the past year, while on a Fulbright fellowship, I traveled with hundreds of Central Americans through Mexico, chronicling their migration northward. I was surprised by how many mentioned Juan Soldado. “I heard about Juan Soldado a few years ago,” one Guatemalan migrant told me. “I prayed and he got me to the other side.” Another Guatemalan, who crossed into the U.S. from Reynosa, more than 1,000 miles east of Tijuana, heard of the folk saint from a fellow migrant: “He said that last time, he crossed with a friend who prayed to Juan Soldado and the friend made it, but he didn’t and was deported. Now he knows to pray to him too.”

“Migrants are running from terrible dangers,” says Father Jesús Arambarri, who supervises a Tijuana soup kitchen. In a sort of modern-day ley de fuga, many are fleeing violent gangs. A rash of Border Patrol shootings of unarmed migrants, meanwhile, has inspired direct comparisons with Juan Soldado’s execution. As a Catholic priest, Arambarri can’t endorse an uncanonized saint. Still, he says, “people believe Juan Soldado can help them.”

Juan Soldado’s likeness has even popped up in the American Southwest, on murals and at shrines where candles burn for loved ones still trying to cross. In a sense, he has finally, 78 years after his death, made it over the border.