SAN DIEGO - The Border Patrol arrested dramatically more immigrant families at the U.S.-Mexico border in August compared with previous months in a spike that a Trump administration official said Wednesday was the result of legal loopholes allowing parents and children to avoid immediate deportation to their homelands in Central America.

The number of families arriving at the Mexico border reached 15,955, said Customs and Border Protection Commissioner Kevin McAleenan. Families accounted for about one-third of people who were stopped at the border.

He called the increase "a direct response to gaps in the legal framework," adding, "we're not surprised by it, but it's been a very stark trend."

The numbers offer a glimpse into the impact of the Trump administration's zero tolerance policy on illegal crossings introduced in April, which resulted in the separation of more than 2,500 children from their parents. President Donald Trump effectively ended the practice of separating families in June amid heavy criticism.

The statistics also come as the midterm elections are approaching and immigration remains a key issue in campaigns across the country. McAleenan, a Trump appointee, called the situation "a crisis of significant proportions from a humanitarian perspective and a security perspective."

Demographic shift

Overall, people arrested or stopped at the border totaled 46,560, up from 39,953 in July and 30,567 in August 2017. Arrests have risen from July to August in four of the previous five years, indicating seasonal factors may be an influence.

The number of people arriving as part of families increased 30 percent from July to August.

The arrest tally is the latest reminder of how border crossings have shifted from predominantly Mexican men to Central American families and children.

Court settlement

Last week, the Trump administration moved to abandon a longstanding court settlement that limits how long immigrant children can be kept locked up, proposing new regulations that would allow the government to detain families until their immigration cases are decided.

Administration officials said that ending the so-called Flores agreement of 1997 would speed up the handling of asylum requests while also deterring people from illegally crossing the border.

The move angered immigrant rights advocates and is expected to trigger a court battle.

Border arrests are an imperfect gauge of illegal crossings because they don't indicate how many people got away.

More shelter beds

Trump touted border arrests when they fell sharply during his first few months in office to less than 16,000 in April 2017. The arrest tally rose in 11 of the following 12 months, topping 50,000 in March, April and May of this year.

The administration said Tuesday that it will expand its tent shelter for immigrant minors crossing the border to 3,800 beds and keep it open through the end of this year. The facility at Tornillo, Texas, which originally opened with a 360-bed capacity for 30 days, is being expanded based on how many children are in the care of the U.S. Department of Health and Human Services.