Border agents in Texas found nearly two dozen illegal immigrants trapped inside several freight train cars traveling through the U.S., authorities said Monday.

U.S. Border Patrol agents from the Hebbronville Station, about 55 miles east of Laredo, found 12 individuals in two separate grain hopper cars during an inspection of a freight train, U.S. Customs and Border Protection (CBP) said in a statement. Hours later, agents discovered 11 more individuals locked inside another grain hopper car in a separate train inspection.

AS BORDER NUMBERS INCREASE, CBP CHIEF SAYS US 'FACES FULL-BLOWN' CRISIS IF TRUMP-ERA POLICIES END

Agents determined the individuals in both incidents had no means of escaping the cars on their own and proceeded to rescue them, according to the agency.

All 23 people, who were not wearing PPE while traveling in the close quarters, were medically screened and later determined to have come to the U.S. illegally from Mexico and Guatemala, the CBP said.

The agency warned of the dangers of hiding in such train cars to illegally enter the U.S.

“This dangerous method of illegal entry into the United States by illegal immigrants is strongly discouraged as it often results in serious injury or death,” the statement said.

BORDER AGENTS, ICE SEIZE MORE THAN 100,000 COUNTERFEIT N95 MASKS IN TEXAS WAREHOUSE

Last month, U.S. Border Patrol said more than 140 individuals were found entering or being smuggled into the country illegally.

The incidents included the rescue of a large group trapped inside a tractor-trailer in a suspected human smuggling operation, the arrest of 44 individuals hiding in the brush near Hebbronville, and the arrest of 100 illegal immigrants in a 24-hour span on Nov. 19, the agency said.

CLICK HERE TO GET THE FOX NEWS APP

Those taken into custody during those incidents were determined to be from countries in Central and South America, including Mexico, Guatemala, Honduras, El Salvador, Nicaragua and Venezuela, CBP said.