The number of migrants encountered by U.S. authorities at the border with Mexico has dropped below 100,000 for the first time in five months amid increased collaboration by Mexico and Guatemala to crack down on the flow of humanity, according to government data released Thursday.

U.S. Customs and Border Protection (CBP) encountered 82,049 people in July, down 21 percent from June when there were 104,344 people and down 43 percent from May. The number of families and minors crossing the border also dropped.

MEXICO DEPLOYS X-RAY TECH TO CRACK DOWN ON ILLEGAL MIGRATION

To avoid punishing tariffs threatened by the Trump administration, Mexico agreed in June to dramatically expand its border enforcement efforts. The country has employed a variety of tools — including a giant X-ray and Mexican National Guard troops —  to uphold its end of the bargain and catch hundreds of migrants.

Guatemalan officials have also played a role, recently agreeing to what’s known as a “safe third country” pact with the U.S., meaning anyone coming through that country from El Salvador or Honduras would not be able to claim asylum in the U.S. The agreement was made even as Guatemalan courts blocked the effort. U.S. officials believe it will be in effect by the end of the month.

The Trump administration also sought to effectively end asylum protections at the southern border, though that effort was blocked temporarily by U.S. courts.

FEDERAL JUDGE STRIKES DOWN TRUMP ASYLUM BAN FOR THOSE CROSSING BORDER ILLEGALLY

The monthly numbers from CBP have become a yardstick by which President Trump measures the success of his administration’s efforts to reduce immigration, his signature issue. The number of migrant families from Central America has risen sharply during his term.

Acting Homeland Security Secretary Kevin McAleenan traveled to another border town - Yuma, Ariz. - on Thursday to detail the new border numbers. He said that in mid-June there were more than 1,250 children in custody for 72 hours or longer — but that number had dropped to about 160 children by Wednesday, with an average custody time of fewer than 24 hours.

In this July 28, 2019, photo, Cameroonians wait in a rented apartment in Tijuana, Mexico, until their names are called to claim asylum in the U.S. (AP Photo/Elliot Spagat)

In this July 28, 2019, photo, Cameroonians wait in a rented apartment in Tijuana, Mexico, until their names are called to claim asylum in the U.S. (AP Photo/Elliot Spagat)

There had been about 10,000 families in custody; now there are 2,000 and they are held about 34 hours, McAleenan said. Single adults are down from 8,000 to about 2,000 in custody. He did not provide the length of detention for single adults, who are often held the longest.

Seasonal declines in migration are common; fewer people make the dangerous journey in the summer. But McAleenan said this year's May-to-July drop was much steeper than over the same time last year.

NEARLY HALF OF ALL ILLEGAL IMMIGRANTS NABBED IN MISSISSIPPI ICE RAID RELEASED ON 'HUMANITARIAN GROUNDS'

“The situation is improving by every available metric, but, and I want to be very clear about this, we remain at and beyond crisis levels,” McAleenan said.

While July’s border numbers are below the peak of earlier this year, they are still high compared to recent history. Until this March, July’s total would have been the highest number in at least the last six years, spanning multiple previous surges of adults and children crossing to the U.S.

Migrants return to Mexico from the Brownsville, Texas Port of Entry last week.  (AP Photo/Emilio Espejel, File)

Migrants return to Mexico from the Brownsville, Texas Port of Entry last week.  (AP Photo/Emilio Espejel, File)

While July’s border numbers are below the peak of earlier this year, they are still high compared to recent history. Until this March, July’s total would have been the highest number in at least the last six years, spanning multiple previous surges of adults and children crossing to the U.S.

Based on Mexican government figures, at least 40,000 migrants who have reached the U.S. border with Mexico are on a waiting list for an initial attempt to seek asylum or waiting for a court hearing in the U.S. after being sent back.

CLICK HERE TO GET THE FOX NEWS APP

The figure represents a dramatic increase from earlier in the year. It is unknown how many have entered the U.S. illegally, decided to settle in Mexico or returned to Central America.

Fox News' Adam Shaw and The Associated Press contributed to this report.