A 1-year-old from El Salvador clings to his mother as a Border Patrol agent watches near Rio Grande City, Tex., on Dec. 7. (John Moore/Getty Images)

A RECENT spike in unaccompanied minors and families crossing the Southwestern border illegally is reviving painful memories from two summers ago, when tens of thousands of migrants traversed the frontier. In October and November alone, border officials caught more than 10,000 children and 12,000 families, in both categories more than double the numbers apprehended in the same period a year earlier.

The quickening cross-border flow is mainly driven by resurgent gang violence in Central America. But the Obama administration and Mexico deserve a measure of blame for ham-fisted policies that have done nothing to ease the plight of people fleeing desperate circumstances — and may indeed have reinforced migrants’ resolve to reach the United States.

Now, faced with an incipient crisis partly of its own making, and anxious at the prospect of further inflaming the immigration debate on the eve of presidential primaries, the administration is trying to stem the tide of migrants with the blunt instrument of deportations. In the first days of the new year, it rounded up 121 women and children whose asylum claims and other efforts to forestall forced removal failed — or were barely mounted in the first place.

The United States is justified in taking steps to dissuade unauthorized migrants from attempting a hazardous journey. The deportations of these most recent detainees, a third of which have already been stayed by 11th-hour appeals, send a signal that may prevent a new deluge of migrants from El Salvador, Honduras and Guatemala. That, at least, is what administration officials hope.

Deportations are often cruel and unfair. Many deportees are initially judged to have plausible claims for asylum, but relatively few receive competent or adequate legal representation in immigration courts, and the government provides inadequate funds for volunteer attorneys to represent minors and nothing for families. Given the scant legal advice they receive, little wonder the likely result for so many is a deportation order.

There are better ways to discourage a fresh exodus of children and families from Central America, starting with a concerted effort by the United States to combat gang violence in the countries where it thrives. U.S. officials also established a program to allow at-risk minors in Central America to apply for asylum from their home countries, without risking the trek to the U.S. border. Thousands of Salvadoran, Honduran and Guatemalan youngsters applied. But owing to red tape, nearly a year went by before the first handful of applicants were allowed into the United States legally, in November. Most of the more than 5,000 children who applied to join parents already legally residing in the United States have not even been granted interviews.

Now, faced with an outcry over the recent deportations, the administration says it will seek help from the United Nations to screen adults as well as minors in Central America and determine who should be granted refu­gee status in the United States or elsewhere.

The sluggish response has left asylum-seekers to make their way north along routes plied by ruthless coyotes. Those routes run through Mexico, which, under pressure from Washington to act as a first line of defense, has done nothing to encourage migrants to seek refuge there. To the contrary, Mexican authorities have subjected many migrants to harassment and inhumane treatment. It’s not a recipe for success.