Flawed child trafficking/labor law generates big business for smugglers.

One of the last things George W. Bush did as president was to sign a law to combat child labor and sex trafficking. The measure enjoyed bipartisan support. It was so uncontroversial that neither chamber of Congress ordered a recorded vote.

Little did its backers suspect that the law itself would trigger another type of trafficking: the transport of children from Central America to the U.S. border by smuggling rings.

The law sets out a process for deporting unaccompanied children so elaborate that it can take years. And because it also stipulates that the children be housed in "the least restrictive setting," it often results in kids being sent to live with relatives in the USA while the process plays out.

The smugglers have a word for this process: permiso, or free pass. That's an exaggeration, but it does convey the simple truth that Central American children who reach U.S. soil won't be sent home any time soon. And that has led to big business for child smugglers.

Those are useful but insufficient steps. The 2008 law needs to be changed.

One approach would be to extend the provisions affecting Mexico and Canada, which are largely exempt from the law, to all of Central America.

Another would be to amend the law to expedite deportations of children who don't have a strong case for staying here. Sen. John Cornyn, R-Texas, and Rep. Henry Cuellar, D-Texas, have a bill to that effect, which Obama suggested he could support.

Congress appears unlikely to act before its August recess. This can be partly blamed on Republican opposition to working with the president. But the main problem is the Democrats whose compassion for the children and outreach to Latinos have blinded them to the law's flaws.

The three countries are impoverished and violent places, but they have been in the past. That alone was never enough to persuade parents to send their kids on dangerous, expensive journeys to a strange land.

As heart-rending as the children's stories are, the U.S. can't simply open its doors to people from violence-torn countries. If it did, huge swaths of the world would empty out.

America remains a welcoming nation built on immigration. Last year, 990,553 people, including many children, were granted permanent legal residency. Some 779,929 attained citizenship. And as many as 11 million undocumented people could be given a path to legal status if Congress ever overhauls the nation's broken immigration system.

But policymakers need to balance compassion and pragmatism. When smugglers send thousands of kids to the U.S. border each month, it's a clear signal that the 2008 law has fallen victim to a different law, the one of unintended consequences.

USA TODAY's editorial opinions are decided by its Editorial Board, separate from the news staff. Most editorials are coupled with an opposing view — a unique USA TODAY feature.