Borders are the most fundamental way we identify Americans. Yet a border is more than a physical location, although that’s an important part of the equation. A border also marks the enforcement of the laws that we use to build a national community, including providing an effective deterrent against illegal immigration. I represent a border state, and I know the system. If our laws don’t work, then our borders don’t work.

Malevolent people have created a crisis by finding and exploiting flaws in our immigration laws. A series of court rulings, glitches in the asylum system, and well-intentioned (but flawed) legislation have combined to open a gigantic hole in the legal architecture of immigration enforcement. The pre-election migrant caravan is only a symptom of a larger, quieter, slow-moving migration catastrophe known as “catch-and-release.”

Most people believe that when an alien is detained (caught) at the border, he is then expeditiously deported to his home country. That is the ideal of the current system, but it is far from the reality.

Every year, tens of thousands of aliens are caught, then released into the interior of the United States. Many never show up for their immigration hearings and pass into the interior of the country, where they are almost never deported. Regardless of how one feels about what should be done about legal immigration, and how we treat illegal aliens already in the country, having a process that creates legal obstacles to deporting illegal immigrants caught at the border causes huge problems.

In practice, obstacles to removing and preventing people who arrive illegally come from three primary sources: faulty claims of a “credible fear of persecution,” flaws in the Trafficking Victims’ Protection Reauthorization Act, and the Flores settlement.

An asylum applicant is required to demonstrate to an immigration officer that he has a “credible fear of persecution” in order to be given a hearing in front of an immigration judge. Immigration officers are now accepting these claims at face value. The response has been overwhelming — the number of “credible fear” claims surged from 5,000 in 2009 to 94,000 in 2016 and show no signs of slowing. The backlog of asylum cases has doubled in the last five years, from 344,000 to 768,000, and within another five years, will double again unless something is done.

On top of the explosion in asylum claims, the Trafficking Victims’ Protection Reauthorization Act, passed ten years ago, has a major loophole: unaccompanied alien children from places other than Canada or Mexico have to be turned over to the Department of Health and Human Services, and placed in the “least restrictive setting.” That often means a parent or guardian in the United States who is also an illegal alien. Between February 2014 and September 2015, 80 percent of unaccompanied alien children from Guatemala, El Salvador, and Honduras were placed with sponsors who are present illegally in the United States.

The inducement for human traffickers to bring children into the United States is clear, which is why more than 200,000 alien children from these countries crossed the border between 2013-2016.

Finally, there’s the Flores settlement, which results from litigation in the 1990s that has been read to create a presumption that all minors caught at the border should not be detained for more than 20 days. This includes most family units, so working-age adults arriving at the border with children, even if they are not their own children, are nearly always released into the U.S. interior pending an immigration hearing.

Most Americans would agree if five working-age males are detained at the border at 2 a.m. in the Bootheel of New Mexico they should be deported. Most Americans can also see the perverse incentives that would be created if the presence of people under 18 in that group leads to the illegal aliens’ release. The border is a dangerous place, and is certainly no place for children, but our laws represent a huge incentive to put the most vulnerable in danger.

Those incentives are part of a widening door for illegal immigration. More will come, and the prospects of action in divided government are low. We must act to close these loopholes now, and we must do it before the Democrats take control of the House. The year-end funding bill is the last train leaving the station in this Congress. Closing catch and release loopholes should be among our top priorities.