Two Mexican nationals were charged in U.S. federal court on Tuesday in connection with a deadly human smuggling attempt in which at least 51 people perished after being trapped inside a sweltering tractor-trailer truck in San Antonio, Texas.

The two Mexican defendants, who were arrested following Monday's incident, were charged with possessing firearms while in the United States illegally, according to court documents and U.S. authorities.

The deceased migrants, 39 men and 12 women, were discovered on the outskirts of the south Texas city, where temperatures swelled to a high of 103 Fahrenheit (39.4 Celsius), in one of the deadliest human trafficking tragedies in recent history.

Authorities called to the scene found the truck parked next to railroad tracks, with bodies inside the vehicle and strewn over a couple of blocks, after the rear door of the trailer had been opened, a local law enforcement official told Reuters on Tuesday.

Local and U.S. authorities said there were no signs of water and no visible working air conditioning inside the truck. Officials said there were "stacks of bodies" and that some of the migrants were hot to the touch.