EFFORTS to craft sensible immigration policies for America have long felt like pushing a boulder up a hill. Thanks to a crisis on the southern border, where tens of thousands of children have arrived this year from Central America, nearly overwhelming officials in such hotspots as the Rio Grande Valley in Texas, the boulder is suddenly rolling the wrong way.

Flows from such violence-racked places as Honduras, Guatemala and El Salvador have been building for months but accelerated this spring. The news has filled with images of toddlers being shepherded by armed border agents, local communities from California to upstate New York refusing to allow overflow shelters to be opened near them and—in Murrieta, near San Diego—a federal government convoy carrying migrant mothers and children turned back by flag-waving protesters chanting “USA, USA”.

Critics, among them Democrats, have charged Barack Obama with an “aloof”, ineffectual response to the crisis. When he was in Texas recently, many asked why he didn’t visit the border in person (“I’m not interested in photo ops,” he retorted). Pondering the situation, he has sounded cool, measured and centrist: America’s analyst-in-chief. What he has not done is take a clear moral lead. That is because he is stuck between a Democratic base that hates talk of hustling kids back to vile lives, and a wider public that does not see a problem that it is America’s job to fix.

More importantly, the crisis has also hurt the prospects for immigration reform, which were already bad. Three pillars of immigration politics are now shakier than they looked. The first involves public confidence that the border is secure. With a larger border force than ever before and crossings from Mexico at historic lows, Mr Obama used to wonder aloud whether any fence could satisfy Republican immigration hawks. Perhaps a moat might convince them, he scoffed while visiting the Texan city of El Paso in 2011. Maybe “alligators in the moat”? Today, Republicans think the joke is on Mr Obama. After being declared reform-wreckers for demanding that near-perfect border security be demonstrated over several years, as their price for granting concessions to migrants already in the country, conservatives are having a “we-told-you-so” moment. Above all, Republicans are seizing on reports that the children are trekking to America partly because of rumours that a soft-hearted Obama administration will allow them to stay. Republicans blame Mr Obama, accusing him of shielding ever-more immigrants from deportation, notably via a 2012 order covering many youngsters brought to America as children. Republicans further grumbled when a request to Congress from Mr Obama for crisis funds sought billions to aid new arrivals: they would rather focus on sealing the border.

Governor Rick Perry of Texas has led Republican calls for “a show of force” to deter more crossings. At one point donning a flak jacket and wrap-around sunglasses to join the Texas police on a river patrol, Mr Perry says he wants 1,000 National Guards for the Rio Grande. Cold logic is not on the hawks’ side. Mr Obama’s government deports more people than any previous administration, at the rate of 1,000 a day. Nor would Mr Perry’s “boots on the ground” obviously deter child migrants, who typically seek out people in uniform and surrender to them. Indeed, tough border defences reportedly led people-smugglers to start transporting children: sending adults had become too hard. But politics is about public perceptions. Mr Obama conceded as much when (jokes about ’gators long forgotten) he said on July 9th that he would be “happy to consider” Mr Perry’s National Guard request, and urged Republicans to reconsider their hostility to a Senate-approved immigration reform plan, reminding them that it would add an extra 20,000 border agents.

A second pillar for immigration reformers has been the idea that they will win the debate by tugging at heartstrings. Campaign groups note how public opinion has been swayed in recent years by the personal stories of youngsters raised as Americans, but without legal papers (dubbed “Dreamers” in a neat piece of PR). When campaigning against deportations, activists have stressed the pain of divided families. But in this crisis compassion cuts both ways. Smuggled children face horrible risks, from robbery to rape. A case can be made—Mr Obama has come close to making it explicitly—that a humane policy would involve swift deportations of Central American children, to convince families to stop sending them.

The dismal consequences of disorder on the border

A final pillar of immigration politics involves the idea that Hispanics—a fast-growing block—are reliably in favour of a more welcoming policy. That pillar is wobbling a bit. Beto O’Rourke, the Democratic congressman for El Paso, was startled by the anger of some Mexican-American as well as Anglo constituents at two public meetings, demanding that “these kids” be sent home, though he says most El Paso voters take a different view, seeing a “refugee crisis” demanding a moral response. Among immigration campaigners, there is talk of sharp debates as some Dreamers, for instance, wonder whether to embrace the cause of newer arrivals from Central America.

The politics of immigration have rolled backwards. Sounding a frankly 19th-century note, some Republicans are fretting about the diseases that migrants may bring. Oklahoma’s governor, Mary Fallin, complains of chickenpox, scabies and lice among children brought to her state. Mr Perry says he does not believe the president “particularly cares” whether America’s borders are secure. That may help the Right in 2014’s mid-term elections. But then what? Mr Obama will never be on the ballot again, while the Hispanic vote will only grow. And for many of these new voters, Republican complaints about illegal immigration sound awfully like hostility to Latinos. In the long term, for Republicans, the immigration politics of the past are a trap.