King Leonidas had his 300. President Trump has his 800. That's the number of soldiers Defense Secretary Jim Mattis has ordered to the southern border to greet the caravan of illegal immigrants originating from Honduras. The band of families and singles, traveling en masse to avoid exploitation by smugglers and coyotes, now numbers 10,000 souls, according to one report. It may take them weeks to reach the United States. A second caravan is already taking shape behind the first. It won't be the last.

An unauthorized march on a border—any border—is a challenge to national sovereignty. And it is precisely the idea of sovereignty that one of the groups supporting the caravan, Pueblo Sin Fronteras, wants to undermine. The confrontation is all the more emphatic when the men at the head of the column bear the flag not of the country they seek to enter but that of their homeland. Americans who oppose illegal immigration and are concerned at the mounting crisis in our border states, where thousands of family units and unaccompanied children are detained as an inundated bureaucracy decides their fates, look to Trump, Mattis, and the Army for relief.

Prepare to be disappointed. The soldiers aren't going to the border to stop the caravan. They're going to assist Customs and Border Protection, Immigration and Customs Enforcement, Health and Human Services, and other authorities as they take in the newcomers. There is little the government can do to turn back the tide. Why? Because the same rule of law challenged by illegal immigration also incentivizes and protects the illegal immigrants within the caravan. It's a paradox—one inflaming this most polarizing of issues at a moment of political decision.

The military can't solve the problem. But Congress can. Only the legislative branch has the authority to close the loopholes through which the most recent illegal migration has passed: a portion of the 2008 Trafficking Victims Protection Reauthorization Act that limits the ability of law enforcement to repatriate swiftly unaccompanied children from noncontiguous (read: Central American) nations; the 1997 Flores settlement that put a ceiling on how long the government can detain these children; and the "credible fear" standard by which illegal immigrants may request asylum proceedings simply by saying they are afraid to return to Tegucigalpa or Quetzaltenango.

These three provisions, along with changing political conditions in Central America, have transformed the character of illegal immigration. The American public still conceives of the illegal immigrant as a young, single male from Mexico looking for economic opportunity in the United States. That is no longer the case. The population of Mexicans living illegally in the United States has declined in recent years because of rising living standards in Mexico and U.S. immigration officials becoming quite skilled at apprehension and repatriation. The new illegal immigration isn't made up of single males looking to become day laborers. It's families harassed by gangs and encouraged by leftwing politicians to flee to safety—and perhaps join family—in the north.

Which is why, though the number of illegal immigrants from Mexico fell, the overall figure stabilized. (And that population could be much larger than we think.) At the beginning of the 21st century, 98 percent of the individuals Border Patrol apprehended were from Mexico. Today, 60 percent are from Central America.

Our first taste of the changing nature of illegal immigration—and harbinger of our Europeanized politics of national identity—was the child migration of 2014. The inauguration of Donald Trump seems to have deterred illegal border crossings. Not for long. By spring 2018, the first caravan was on its way. This latest wave grew in strength.

Its very nature makes it that much more difficult to counteract. Not just because there are children involved, but because of our national self-image as the refuge of free peoples. The humanitarian instinct is a powerful force in American immigration policy: Look at the backlash to family separations resulting from the administration's zero-tolerance policy earlier this year as well as to the State Department's cap on refugee admissions. Our moral imagination asks us to put ourselves in the shoes of these families, denizens of failed states that offer neither personal nor economic security, lured here by the promise of a better future, and encouraged by cynical politicians and nongovernmental organizations eager to strike a blow against "The Empire" and its president.

But humanitarianism only gets you so far. In this case, our desire to help strangers unintentionally contributed to a mounting crisis that benefits no nation. And to which we have not responded adequately. Yes, calling in the Army is fine. The agencies on the ground need help. What they ultimately require, however, is congressional action.

Amend the 2008 law to accelerate repatriations, address Flores in legislation that permits indefinite detention of family units, and tighten the standards for asylum. Provide more money for beds, judges, and bureaucrats to speed up legal proceedings. Announce forcefully and unequivocally that it is the citizens of the United States, acting through their elected representatives, who decide the conditions and criteria under which individuals are allowed to enter this nation.

And maybe get serious about building that wall while you're at it.