Feeling the political heat over separating families of illegal immigrants, President Donald Trump took executive action in June to scale back his “zero tolerance” policy for border crossers.

But under existing law, this had fairly predictable results, immigration experts said.

“Catch and release is not an official policy, but it is the default until we have better laws,” Chris Chmielenski, deputy director of Numbers USA, a research group that supports immigration restrictions, told The Daily Signal.

While curbing illegal immigration was Trump’s signature campaign issue, and the Justice Department and Department of Homeland Security have increased enforcement, the problem of illegal border crossings has escalated again in recent months.

Experts say the Trump administration may have done everything possible through executive action, and must rely on Congress to close certain loopholes to better secure the border.

In lieu of consequences, the number of migrant parents illegally entering the United States escalated since Trump ended separation of children from parents at the border, The Washington Post reported this week.

The Border Patrol arrested 16,658 family members in September–the highest on record, the newspaper reported, citing unpublished Department of Homeland Security statistics.

Even before a large caravan began making its way through Central America toward the United States, large groups of 100 or more parents and children were crossing through Mexico into Arizona to make asylum claims.

Under the law, the U.S. is required to adjudicate asylum claims, and cannot detain children for more than 20 days. This can lead to freeing families into the interior of the country who may not show up for their hearing.

“The reason we have border surges is that when migrants get to the border they are either apprehended, but know when they get caught they will get released, or there just isn’t enough space to detain them,” Chmielenski said in an interview with The Daily Signal.

“You can only hold minors for 20 days. Then they are released, usually with the adult they came with,” he said.

He said Immigration and Customs Enforcement lacks detention space, which requires releasing some illegal immigrants while more flow into the country.

Three major issues in existing law impede stopping the large influx of illegal immigrants.

In 1997, the Clinton administration entered into something called the Flores Settlement Agreement, which ended a class action lawsuit first brought in the 1980s. The settlement established a policy that the federal government would release unaccompanied minors from custody to their parents, relatives, or other caretakers after no more than 20 days, or, alternatively, determine the “least restrictive” setting for the child.

In 2016, the U.S. Court of Appeals for the 9th Circuit expanded the Flores settlement to include children brought to the country illegally by their parents or other adults.

Separately, Section 235(g) of a law called the William Wilberforce Trafficking Victims Protection Reauthorization Act states that unaccompanied minors entering the United States must be transferred to the custody of the Department of Health and Human Services’ Office of Refugee Resettlement, rather than to the Department of Homeland Security.

This left the Trump administration with the option of either releasing every immigrant with a child who crosses the border; or to release only the child, as required by the 9th Circuit Court of Appeals’ interpretation of the Flores settlement, while holding the parents or other adults who accompany them for a hearing.

On other fronts, the 2001 Supreme Court ruling in the case of Zadvydas v. Davis ended indefinite detentions of illegal immigrants who face deportations.

A loophole used by child smugglers and human traffickers is the Refugee Act, which establishes procedures for admitting and caring for refugees seeking asylum in the United States.

“The reality is when you end the no-tolerance policy with no fixes, then basically, if you come to the U.S. with a child in tow, they have to release you,” David Inserra, a policy analyst for homeland security with The Heritage Foundation, told The Daily Signal. “The number has been spiking in the course of a couple of months.”

The caravan of 4,000 approaching the U.S. through Central America has drawn even more attention to the problems with immigration law. The group originated Oct. 12 in Honduras.

Trump issued two strong warnings Thursday on Twitter, saying he is willing to send troops to the border.

In the case of the caravan, Mexico has stepped up enforcement to prevent it from crossing its border en route to the United States. Meanwhile, law enforcement in Guatemala detained a former Honduran legislator who purportedly is one of the organizers.

This indicates Trump’s threat to cut off U.S. funding from Central American countries could be effective, Inserra said. However, he said, there should be consideration on following through.

“Some countries rely on funding to help fight corruption and instability, so it’s a double-edged sword,” Inserra said. “We don’t want more instability and corruption in those countries, or we could have more migration. But, we do need to ask them to do their part.”

As for putting the U.S. military on the southern border, Inserra said, there may be better options.

“If 4,000 people are trying to force their way across the border, it would justify the National Guard. But that’s an expensive route to go,” Inserra said. “A better route would be keeping them from coming here to begin with.”

“If someone claims asylum,” he added, “what is the military supposed to do? Say no? The military can’t. The military is not a law enforcement agency.”

That said, the military could provide more hands on deck at the border, Numbers USA’s Chmielenski said.

“The military can’t apprehend illegal border crossers, but they can still do a lot of administrative work,” he said. “Drug cartels flood one area of the border to make another border area vulnerable.”