A U.S. Customs and Border Protection officer walks past vehicles in line at the San Ysidro Port of Entry in Tijuana, Mexico, on Monday. (Tomas Ayuso/Bloomberg)

THE SAN YSIDRO port of entry linking San Diego and Tijuana, Mexico, is one of the world’s busiest border crossings, and a sight to behold: several dozen lanes of vehicular traffic (a dozen new ones are under construction), plus pedestrian walkways, daily bearing roughly 70,000 northbound passengers in vehicles, plus several thousand trucks, in addition to some 20,000 pedestrians. It features dozens of inspection booths, hundreds of personnel from the Border Patrol, Drug Enforcement Agency and other U.S. agencies, as well as a dazzling array of inspection gear and other high-tech gadgetry.

Compare that with the facility’s capacity to process migrants who cross there legally seeking to apply for asylum in the United States: a few score migrants a day, rarely more than 100 and sometimes as few as 40 — a bottleneck further narrowed by the Trump administration’s restrictive policies. Hence the frustration that has built with the recent arrival in Tijuana of several thousand Central American migrants, which on Sunday erupted in chaos when scores of them rushed the border crossing, prompting Border Patrol agents to repel them with volleys of tear gas.

The administration is trying to strike a deal with Mexico under which Central American migrants would remain in that country while their applications for asylum in the United States are processed — a stopgap that seems unlikely to last, if it is implemented at all. It may present the migrants with two bad options: remain in Tijuana, exposed to drug cartel violence and the growing hostility of local authorities, or try crossing the border illegally rather than presenting themselves legally at San Ysidro.

The Trump administration is within its rights to seek humane means to deter Central American migrants from undertaking the dangerous journey through Mexico. Separating families, which the administration tried for six weeks last spring, was not a humane option. Allowing them to apply for asylum from Mexico might be, if they are able to access legal help and live safely while doing so, both big ifs.

More practical would be to build the capacity to fairly and swiftly process asylum seekers and deport those whose applications do not pass muster. That means more detention space; more interviewers who determine whether migrants meet the “credible fear” threshold; and more immigration judges. The inadequacy of current capacity, along with court rulings forbidding detention of minors for more than 20 days, has contributed to a backlog of some 1 million cases in the immigration courts, and to the dilemma of “catch and release,” whereby migrant families go free for months or longer while awaiting adjudication of their asylum claims.

Despite a recent surge in migrant families, the overall number of illegal border-crossers, as measured by those apprehended by Border Patrol agents, has been falling for decades. For that reason, calling the current crop of migrants a “crisis,” and using caravans as a scare tactic for political purposes, is misleading in the extreme. Rather than tear gas and melees at the border, it would be wiser for the United States to promote prosperity and rule of law in Central America, spread the word that asylum applications are rarely granted and build the infrastructure to handle a genuine need.