Humanitarian crises can have many causes: civil war, dictatorship, disease or famine. But the wrenching one now playing out along the Texas border, involving tens of thousands of children – refugees from the savage anarchy of Central America – is different. For here, good intentions have fallen victim to the Law of Unintended Consequences.
The William Wilberforce Trafficking Victims Protection Act of 2008, so named in honour of the great British abolitionist, was among the last pieces of legislation of the George W Bush presidency, passed unanimously by the then Democrat-controlled Congress. The measure provided sanctuary for children from countries such as Guatemala and Honduras (though not Mexico) who might have been victims of sex slave trafficking.
Then, a couple of years ago, President Obama issued an order deferring deportation for children who arrived in the country aged under 16, and who had permanently lived in the US since 2007. The aim was to allow two million people who were, to all intents and purposes, Americans, to live a semi-normal life. But for millions of wretched souls in Central America yearning for a foothold in the US, and the gangs that demand an extortionate price to enable them to get it, the two presidents might have posted signs on the bridges across the Rio Grande, saying: "Come in".
In terms of numbers, the crisis is nothing compared with the tidal waves of refugees forced from first Iraq and now Syria by sectarian conflict. Even so, some 57,000 children, some of them aged as young as four, and many of them unaccompanied, have made their way across the US border since last October, most of them from Honduras, Guatemala and El Salvador, far overwhelming the capacity of immigration services to process them.
The intentions on the part of the US authorities might have been noble. But the result has been a 21st-century nightmare, exposing the children to journeys of danger and suffering, and the US to accusations of incompetence at best, heartlessness at worst, and charges that the country's politics have reached a nadir of selfish partisanship.
You might have thought that, faced with a crisis of such poignancy and immediacy, Republicans and Democrats would put aside their differences. After all, the root of the problem lies not in the US but in the children's lawless but not-too-distant homelands.
Honduras may be the most dangerous place on earth, with a murder rate of 90 per 100,000 (compared to five in the US and one in Britain), and Guatemala and El Salvador are in the top six. Along with the violence, there is desperate need: across swathes of Central America, Mexico apart, half the population lives below the poverty line.
True, America contributes to the problem, as the main buyer of the drugs sold by the traffickers, and the main seller of the guns with which they enforce their rule. But the only lasting solution to the crisis lies in ensuring the populations of Central America have a better life in their own countries. On this, at least, you might expect the parties to agree. But you'd be wrong.
At one level, the impasse reflects the deadlock on wider immigration reform. The presence of the children – many of them sent to stay with relatives while their cases grind though the courts – conjures up for many Republicans the dread A-word, or amnesty, reinforcing their belief that the best way of stopping illegal immigration is to build a Great Wall of America along the entire 2,000-mile border with Mexico.
In fact, the Senate did pass a comprehensive immigration bill in 2013, coupling tighter border controls with a path to citizenship for illegals already here. But the House of Representatives, where anti-immigration Tea Partiers largely call the shots, refuses to take it up.
Obama has asked Congress for $3.7bn to cope with the crisis, half to be spent on reinforcing border controls, and the rest on improving the system to handle those children who have made it to the US. The White House says it is ready to toughen, or even repeal, the 2008 act so that children can be sent home faster, giving the lie to the gangs' avaricious claims that $10,000 or so buys your child a new life in the promised land of El Norte. But that has merely raised the hackles of more liberal Democrats, who warn that to send the children back could be the equivalent of a death sentence.
Just maybe, this humanitarian mess could be the catalyst for broader reform of an immigration system described as an "insanity' by Bill Gates, Warren Buffett and Sheldon Adelson – three of the country's richest men – in a joint op-ed piece in The New York Times on Friday.
But such hopes ignore the total dysfunctionality of current American politics. True, Obama's style – that disdainful remoteness that can be so maddening – doesn't help. But the bulk of the blame lies with Republicans, whose only strategy is to blame the President for everything.
Some, absurdly, call for his impeachment; even John Boehner, the once pragmatic Speaker who is now hostage to the far right, mutters about suing Obama for exceeding his constitutional powers. Ted Cruz, that rabble-rouser of a Texas senator with an eye on a 2016 White House run, denounces "a disaster that is the direct consequence of President Obama's lawlessness". In fact the crisis has arisen precisely because Obama has followed the law, as laid down by the 2008 act.
The only consolation is that beyond the rhetoric, everyone has an incentive to do something. If they don't, the child refugee flood is set to reach 100,000 by year's end: grim news for a President whose polls ratings are already reeling – but also a reminder to voters of what they don't like about the Republicans, just in time for November's mid-term elections, and to every American of how far their country has veered from the lofty and generous ideals it preaches to others every day.