A San Antonio Fire Department official said they found "stacks of bodies" and no signs of water in the truck, which was found next to railroad tracks in a remote area on the city's southern outskirts.
"The patients that we saw were hot to the touch, they were suffering from heat stroke, exhaustion," San Antonio Fire Chief Charles Hood told a news conference. "It was a refrigerated tractor-trailer but there was no visible working A/C unit on that rig."
Sixteen other people found inside the trailer were transported to hospitals for heat stroke and exhaustion, including four minors, but no children were among the dead, the department said.
The city's Police Chief William McManus said a person who works in a nearby building heard a cry for help and came out to investigate. The worker found the trailer doors partially opened and looked inside and found a number of dead bodies.
Temperatures in San Antonio, which is about 160 miles (250 km) from the Mexican border, swelled to a high of 103 degrees Fahrenheit (39.4 degrees Celsius) on Monday with high humidity.
McManus said this was the largest incident of its kind in the city and said three people were in custody following the incident, though their involvement is not yet clear.
A spokesperson for U.S. Immigration and Customs Enforcement (ICE) said that its Homeland Security Investigations division was investigating "an alleged human smuggling event" in coordination with local police.
At least 22 Mexicans were among the migrants found dead in a trailer truck in the US state of Texas, President Andres Manuel Lopez Obrador of Mexico said Tuesday, as he put the total number of fatalities at 50.
"It's a tremendous misfortune... so far there are 50 dead: 22 from Mexico, seven from Guatemala, two from Honduras and 19 still without information about their nationality," the Mexican leader said at a morning press conference.
Mexico's Foreign Minister Marcelo Ebrard said consular officials would go to the hospitals where victims had been taken to help "however possible."
A spokesman for the Honduran foreign ministry told Reuters the country's consulates in Houston and Dallas would be investigating the incident. Ebrard said two Guatemalans were hospitalized and Guatemala's foreign ministry said on Twitter that consular officials were going to the hospital "to verify if there are two Guatemalan minors there and what condition they are in."
The I-35 highway near where the truck was found runs through San Antonio from the Mexican border and is a popular smuggling corridor because of the large volume of truck traffic, according to Jack Staton, a former senior official with ICE's investigative unit who retired in December.
In July 2017, 10 migrants died after being transported in a tractor-trailer that was discovered by San Antonio police in a Wal-Mart parking lot. The driver, James Matthew Bradley, Jr., was sentenced the following year to life in prison for his role in the smuggling operation.
This report was written with information sourced from Reuters and Agence France-Presse.