A few hundred feet from the American border, José Manuel Talavera contemplated his challenge with the focus, if not quite the physique, of an Olympic high jumper. A stocky coffee farmer from Honduras, he was fresh off La Bestia, or the Beast — the freight train network used by migrants to cross Mexico. Now he was preparing to vault into the United States, for the third time.
His options, both of which involved days of trekking through searing deserts, were unappealing: pay thousands of dollars to a guide, or carry a rucksack filled with drugs for a cartel.
Mr. Talavera shrugged. He did not see himself as a factor in America’s presidential election, even though he had a vague idea about Donald J. Trump and his threats to build a “beautiful, impenetrable wall.” It seemed silly: Was the border not already walled? He knew how hard it was to cross. The first time, a Mexican drug cartel kidnapped him and took all his money. On the second attempt he made it to America only to be captured, detained for two months and put on a plane back to Honduras. It was his first flight. “One month to get there, four hours to go back,” Mr. Talavera recalled with a smile. “At least the ticket was free.”
Now the border loomed again, bristling with guards and cameras. This time, if caught, he faced six months in detention. He didn’t care. “I’ll go back and try again,” he said. Nothing could stop him, he said. Not even a new wall.
Across the globe, walls are going up. In Europe, columns of refugees snaking over borders have sent leaders scrambling for solutions in concrete and razor wire. Hungary has erected a 108-mile-long fence to keep out Syrians; at the French port of Calais, Britain is funding a barrier to prevent Afghans and Africans slipping into the channel tunnel. Public sympathy for immigrants, once kindled by images of drowned infants washing up on European shores, has been curdled by terrorist attacks in Brussels, Paris and Nice. The defensive mood has spread to Africa, where Kenya plans to build a 440-mile-long wall along its frontier with Somalia to keep out the Shabab militia.
As a reporter based in the Middle East, I’ve mostly been on the other side of those walls, in places that might be described as the underbelly of globalization. This spring, in a scruffy Egyptian fishing village at the mouth of the Nile, I met restless teenagers who, drawn by images of Western glamour on Facebook, yearned to board the smugglers’ boats. In the devastated Syrian city of Aleppo, I had breakfast with a surgeon who, as bombs exploded outside, spoke of dispatching his family to Canada. In Tripoli, Libya, a young Nigerian migrant named Oke peeked through a church door, mulling his chances of surviving the fraught voyage across the Mediterranean.
America, the land of migrants, never seemed to need walls. It had water — vast oceans, east and west — and, since 2001, a formidable visa program. And yet this year, the dream of a grand protective barrier across the 2,000-mile frontier with Mexico catapulted Mr. Trump’s presidential bid into stunning viability. “Build that wall!” chanted candidate and crowd in unison at rallies this year.
And yet, the closer you get to the border, the fewer people think that it might work — even among Trump supporters and law enforcement officials. “The wall is a fantasy,” said Tony Estrada, the sheriff of Santa Cruz County, Ariz., a border district that is one of the busiest corridors of drugs and people smuggling in America. “I don’t care how big, how high or how long it is — it’s not going to solve the problem.”
He sighed. “But people are eating it up,’’ he said. “I can’t believe it.”
Mr. Estrada, who is 73, knows better than most that borders are more than lines on a map. Born in Mexico, he arrived in America at the age of 1. Until the 1970s, he said, the border had an organic quality. During the Cinco de Mayo fiesta, dancers paraded from Mexico into America then back again; beauty queens from both countries sat together on a platform that straddled the border; white tourists crossed into Mexico for the bullfights, the night life and the “rum runs” — cheap alcohol.
Then the drug wars exploded, and in 1995, a fence started to rise. Crime fell sharply, but the drop exacted a cost. Tourism withered, the curio shops closed and there was a painful tear in the cross-border culture. “The dynamic changed,” he said.
The sheriff’s nostalgia pointed to a wider truth: Walls are not just about whom a country wants to keep out; they are a mark of what it is trying to preserve, its idea of itself. With the rise of Mr. Trump, America’s sense of itself is suddenly less sure. And so I spent a week in the southern borderlands, flitting between Mexico and America, trying to figure out what, in this febrile election season, that idea might be.
The fence itself is a formidable sight, spanning about one-third of the 2,000-mile frontier from California to Texas, and patrolled by about 20,000 agents. One of the most tightly guarded stretches is around the city of Nogales, which straddles the border. Here, the first world abuts the third. American Nogales, orderly and somniferous, pushes up against Mexican Nogales, an unruly metropolis of 300,000 souls where the Sinaloa cartel looms large.
John Lawson, a border patrol officer born in Pennsylvania, took us on a tour of the fence, a slatted metal barrier, 18 to 30 feet high, that undulates along the hills on either side of Nogales. It was built at a cost of $4 million per mile, which includes an array of military-style fortifications. We passed pole-mounted cameras, radars, vibration sensors and, in the dip of valley, a line of World War II-style Normandy barriers meant to stop any Mexican vehicle from crashing through America’s front gate. The border patrol reaches into the air, too, with a fleet of drones, balloons and Blackhawk helicopters.
And yet, the “migrantes” and the “traficantes” still slip through.
Officer Lawson pulled up on a small bluff overlooking the border and pulled out his binoculars. Half a mile away, inside Mexico, three young men trudged along a ridge, then vanished behind a splash of foliage. Farther along we saw other groups: spotters, employed by the cartel, Officer Lawson said. They use their cellphones to direct traffic, telling migrants and drug smugglers when to make a run for it. Looking left and right, on the American side, I counted six patrol jeeps, parked on hillocks.
Both sides sat still, watching the other, waiting for one to make a move. “The purpose of the fence is to buy time,” said Officer Lawson. “It allows us to respond. But it can’t stop them completely. Nothing can.”
As in Europe, where rising walls have forced migrants to chance their lives in rickety boats, the militarized American border has created ever more perilous routes. In Arizona, that means heading for the desert. Beyond Nogales, where the fence peters out, migrants march for days through a sweltering landscape. Since 1999, more than 2,000 people have died in the Arizona deserts, often from exhaustion or thirst, according to the Tucson Samaritans.
Before setting off, many migrants pass through the comedor, a tin-roof shelter within sight of the border in Nogales, Mexico. The staff of the charity offers food, legal advice, massages and small compasses to help those who might get lost in the desert. Hope mingles with heartbreak along the cramped benches where breakfast is served. Men like Mr. Talavera, plotting a way to the United States, break bread with families that have just been deported, their faces etched with dejection. Under President Obama, the United States has deported 2.5 million people — more than any other administration.
The comedor is named after Eusebio Kino, an Italian Jesuit who roamed these lands in the early 18th century, and its staff members are driven by their own sense of mission. The morning we visited, a Catholic nun delivered a cautionary lecture about José Antonio Elena Rodríguez, a 16-year-old Mexican shot dead through the fence by an American patrol agent in 2010 (the agent was charged with murder this year). A priest offered a blessing and the men filed out.
Walking in twos and threes for safety, they melted into the streets, biding their time to make a break for the border.
In Arizona, the sweeping landscape is dotted with relics of the Old West. In the town of Tombstone, tourists pay to see a comical re-enactment of the shootout at O.K. Corral. Farther out, in Skeleton Canyon, a roadside monument marks the surrender of the great Apache warrior Geronimo in 1886 — a reminder of the Native Americans who once held sway here.
To modern-day cowboys and ranchers, Mexican migrants are the new foe. Ranching families thronged to the Cochise County Fair, outside the border town of Douglas, for an archetypal show of rural Americana. Children screamed with delight at the turkey race as their parents went to the rodeo; neon-lit stalls sold corn dogs, Confederate flags and gun paraphernalia.
Tony Fraze, a rancher and Trump supporter, paused to chat. Migrants were the scourge of the area, he said. They damaged fences, vandalized water systems and left trash that killed livestock. “You can’t leave your door open or your keys in your truck,” he said. “If you do, they might take them and kill you, too.” He mentioned Rob Krentz, a local rancher shot in 2010 in a traumatic case that briefly made the national news.
Although he was right on the specifics, the border counties generally enjoy some of the lowest crime rates in Arizona. As Sheriff Estrada told me, smugglers don’t like to court trouble. “They’re businessmen, and confrontation is bad for business,” he said.
But to Mr. Fraze, it was about more than just the border: Weakness on immigration mirrored a broader decline of American strength. “We’ve had too much wishy-washy — people trying to control it, not end it,” he said of migration policy. “That’s what we should have done years ago with the World Trade Center — flown over there, put it back to nature and have it done. Playin’ around just don’t get it done.”
Not everyone sees tough talk as the answer. During my border visit, I met many artists, activists and even ranchers who sought to reach across the border, not close it. Dennis Moroney, a white-bearded cowboy with a Mexican-born wife, said he understood the rage of fellow ranchers; his cattle had also died from eating plastic bags. But the Trump phenomenon, he felt, fed off darker impulses: “racism and xenophobia and fear of those dark people who don’t talk like us.”
Dark clouds scudded the sky as we drove 30 miles east to see Ed Ashurst, a cowboy of craggy temperament. He is the author of three books on ranching and one on the migrant problem, titled “Alligators in the Moat.” “Immigration is a multikazillion dollar industry,” he declared. “They have scouts on every mountain and an intelligence operation better than the C.I.A.”
The night before, he found a migrant snoozing in his saddle house, and promptly turned him over to the border patrol. He hates President Obama (“not a patriot”) and likes Mr. Trump, but dismissed talk of a border wall as a “farce.” His solution was to deploy Navy SEALs along the border, arm them with AR-15 rifles, and give them orders to shoot anyone who crossed.
Later, on a walk through a field, Mr. Ashurst pointed to the detritus left by migrants — food tins in Spanish, plastic bags. I asked if he felt any compassion for the migrants’ plight. His voice rose sharply. “I’ve helped more Mexicans than these activist types,” he said. “But just because I’m a Republican, and I want a closed border, I’m a sorry son of a bitch.”
Today’s illegal immigrant, however, could be tomorrow’s American. In Nogales, there’s a short stretch of border where the fence turns into a metal grille. At sundown one evening we watched as two women faced each other across the border, touched fingers through the grille, and wept.
Gaby Jiminez, a house cleaner in Phoenix, had never dared approach the border since she slipped into the United States in 1993. Now that her papers were being legalized, she had plucked up the courage to see her sister, Trinidad, for the first time in 18 years. The two women laughed, gossiped and cried for half an hour; before leaving, Gaby pushed a $100 bill through a hole in the fence.
She yearned to embrace her sister, but soon she would have her own passport, and visit her in Mexico.
Beyond any single border, immigration has become an issue across the world because of a painful reckoning with globalization, said Alexander Betts, director of the Refugee Studies Center at Oxford University. “Ten years ago, crime, education and health were the defining policy issues,” he told me. “Now it’s about people’s sense of control over their societies and their communities.”
A sense of mutinous resentment among those left behind by globalization helped drive the British Brexit vote to leave the European Union in June. In such sour times, said Professor Betts, immigrants provide a handy scapegoat, and walls make for easy solutions.
“Liberal politics is struggling to find an answer, but the far right has an answer that resonates,” he said. “It’s about a reassertion of nativism, nationalism and identity politics, and telling people that the solution to globalization is to close borders.”
While walls may divert the human flood, they cannot stop it. The proportion of the world’s population who are migrants has actually been stable since 1970, said Professor Betts. The impulse to flee — for reasons of war, poverty or to simply make a better life — may be too hard to stop.
Before he vanished from Nogales to make a risky border crossing, I asked José Manuel Talavera if the prize was worth the peril: thirst, violence, scorpions, actual coyotes. In response he mentioned his five children, including his 3-month-old daughter, Luna Soad. He was doing it for her.
A week later came word of his fate. Mr. Talavera had made it to America, his wife said, speaking by phone from their village near Tegucigalpa, the Honduran capital. She didn’t know how he did it, or where he ended up. But he was doing well, she said. He had started looking for work. The wall was finally behind him.
Declan Walsh is a foreign correspondent for The New York Times.