In the eyes of Texas Gov. Rick Perry and others, the crisis on our southern border demonstrates the failure of our immigration policy. They are correct, though not in the way they think. The failure in our immigration policy comes from the persistent belief that we can make rivers run uphill.

The sudden flood of underage migrants, sometimes accompanied by their mothers, didn't happen because border security has been neglected. This administration, like its predecessor, has made a fetish of toughness against anyone trying to get in without authorization. It's worked, but only up to a point—and often with perverse results. This influx happens to be one of those unanticipated effects.

Since 2000, federal spending on immigration enforcement has tripled, after adjustment for inflation. The Border Patrol has twice as many agents as it did 10 years ago. The border has 650 miles of fencing that wasn't there before, augmented with trenches, motion sensors, cameras and surveillance drones.

Deaths among undocumented migrants have risen because they've had to venture into more remote and dangerous terrain to elude pursuers. Deportations are at record levels. If more enforcement were the remedy, there would not be a problem.

But here's one paradox: The closer we come to sealing off the border the more we encourage undocumented foreigners to buy instead of rent. In the old days, many people came without papers from Mexico and Central America to work for a few months and then went home, often repeating the process year after year. Today, those who get here tend to remain because they can't be sure of making it back should they leave.

That's one reason for the arrival of so many Central American kids. Princeton sociologist Doug Massey says the surge is a byproduct of our involvement in military conflicts in the region during the 1980s, which wrecked economies, destabilized societies and prompted many people to head here.

"Some of these people circulated back and forth initially," he said in an email, "but after the U.S. militarized the border in the 1990s, this became infeasible and they ended up staying north of the border. At this point their children are older and families are desperate for reunification, especially in the context of the economic turmoil and violence that arose from the U.S. intervention and never went away."

The desperation is not hard to comprehend. According to a study by the Department of Homeland Security, most of those arriving from Honduras and El Salvador come from the most violent areas.

The exodus is not just across the Rio Grande. The U.N. refugee agency says the number of people from Honduras, El Salvador, and Guatemala seeking asylum in neighboring countries, from Mexico to Panama, has risen a stunning 712 percent since 2008. They aren't showing up in those places because of anything Barack Obama has done.

A report from the agency notes the stark findings of interviews with 104 children from El Salvador: "Sixty-six percent of the children cited violence by organized armed criminal actors as a primary motivator for leaving, and 21 percent discussed abuse in the home. … Only one child mentioned the possibility of benefiting from immigration reform in the U.S."

Nor would these kids stop coming here if we immediately shipped them back where they came from. We already do that with Mexican children apprehended at the border—yet they still outnumber the Central Americans. The impulse to escape from violence and poverty is too strong to suppress. Those who want in badly enough will keep trying until they make it.

Many of those on this side of the border denouncing the arrivals say they are opposed only to illegal immigration. But the reason so many foreigners come illegally is that we offer no other avenue. The annual number of legal spots for low-skilled immigrants is 5,000—for the entire world. Even foreigners with family members living here legally may have to wait decades to be allowed in.

Central Americans in terrible straits don't have the luxury of waiting, and getting tougher won't make them more patient. Michelle Brane, director of the Migrant Rights and Justice program at the Women's Refugee Commission, says it's like using threats to keep people in a burning house: "If they're in a burning house, they're going to jump out a window, run out the door, find a way out.

We can send them home, but that won't mean we've seen the last of them.