WASHINGTON — American immigration officials arrested 2,885 fewer people at the Southwest border last month than in June, the second month in a row that the number of migrants trying to enter the United States has dropped.

Data released on Wednesday by the Department of Homeland Security show that authorities apprehended 39,953 people at the American border with Mexico in July. The number of arrests in June totaled 42,838.

A senior Homeland Security official attributed the decrease in apprehensions in part to the Trump administration’s stepped up immigration policies at the border. But the official agreed with advocates and experts that the numbers also reflect seasonal flows of border crossings; individuals are more likely to travel in milder weather than during the often dangerous heat of summer.

An estimated 4,357 unaccompanied children showed up at the border in July, the data show, compared to 5,562 in a month earlier. Meanwhile, 12,285 people traveling in family groups were denied entry to the United States last month, compared to 12,386 family members in June.