SAN DIEGO — More than 16,000 families were apprehended at the border in August, authorities said Wednesday, a dramatic increase from previous months that the Trump administration blamed on legal loopholes and a reversal of a widely denounced policy that separated parents and children.

The number of family arrivals reached 15,955, a sharp increase from July that Customs and Border Protection Commissioner Kevin McAleenan said was one of the highest on record. Families accounted for more than one-third of people who were stopped at the border.

He called the increase “a direct response to gaps in the legal framework.”

Overall, people arrested or stopped at the border totaled 46,560, up 17 percent from 39,953 in July and up 52 percent from 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 families increased 30 percent from July to August, outpacing the overall increase.

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 Trump effectively ended the practice of separating families in June amid heavy criticism.

With the midterm elections looming and immigration a key issue in congressional races across the country, McAleenan, a Trump appointee, called the situation “a crisis of significant proportions from a humanitarian perspective and a security perspective.”

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

The Border Patrol, which polices official ports of entry, made 37,544 arrests in August, including 12,774 of people who came as families and 4,396 children traveling alone.

Another 9,016 were stopped elsewhere, including 3,181 who came as families and 376 as unaccompanied children.

Last week, the Trump administration proposed new regulations that would allow the government to detain families until their cases are decided.