Border agents with U.S. Customs and Border Protection (CBP) rescued more than five dozen illegal immigrants who were trapped inside sweltering tractor trailers over the weekend as they were being smuggled into the country, officials said Thursday.

In five separate incidents, Border Patrol — which polices the border between ports of entry — arrested 64 people who had entered the U.S. illegally. They also arrested nine American citizens who allegedly aided their trip across the border.

DHS TOUTS DROP IN BORDER CROSSINGS AMID 'ZERO TOLERANCE' PUSH

The federal agency "thwarted 42 smuggling attempts involving tractor trailers" and rescued 406 people "from possible death due to soaring temperatures" along the U.S.-Mexico border in the last two months, according to a news release.

Border Patrol agents, the CBP added, have amped up efforts to rescue stranded people along the Arizona border, regardless of the immigration status of those stranded.

The agency also announced Thursday its agents arrested about 42,600 people along the border in June — an 18 percent drop from the nearly 52,000 arrests made in May.

Of the more than 40,000 arrests made at the border, roughly 34,000 of those were made by Border Patrol. The rest occurred at official border crossings.

MERKEL AGREES TO MIGRANT CAMPS, TIGHTER BORDER CONTROL IN A BID TO STAY IN POWER

While it's unclear what sparked the decline in illegal border crossings, the scorching temperatures experienced along the southern border may be to blame.

The Trump administration's "zero tolerance" policy, which resulted in the separation of hundreds of families, may also be a factor.

The Associated Press contributed to this report.