The San Antonio authorities discovered at least eight bodies in an overheated tractor-trailer in a Walmart parking lot on Sunday morning, in what the police chief called a “horrific” human trafficking crime.

The chief, William McManus, said at a predawn news conference that a store employee making the rounds late Saturday night was approached by someone from the truck “asking for water.” The employee returned with the water and called the police, who found the bodies at the back of the truck.

The chief had indicated “juveniles” were among the group in the truck, but later said on CNN that eight men had died. A spokesman for the San Antonio Police Department later said by email that they were believed to have died as a result of heat exposure and asphyxiation. The bodies were taken to the Bexar County Medical Examiner’s Office to determine the cause of death.

At least 38 people were in the trailer, the fire chief, Charles Hood, said at the news conference. Among them were two “school-age children” and others in their 20s and 30s, he said. The spokesman later said two of those injured are 15 years old.

“The truck was loaded with people,” Chief Hood said, adding that about 20 were taken to seven hospitals, some dehydrated and in “extremely severe” or critical condition. Eight others, he said, had non-life-threatening injuries.

A spokesman for the San Antonio Police Department later said that two of the youngest victims who were injured are 15 years old. He also said the eight people were believed to have died as a result of heat exposure and asphyxiation. The bodies were taken to the Bexar County Medical Examiner’s Office to determine the cause of death.

Chief McManus said that surveillance video showed that several vehicles had approached the trailer to pick up survivors of the ordeal.

“We’re looking at a human trafficking crime here this evening,” Chief McManus said.

Homeland Security and Immigration and Customs Enforcement were involved in the investigation, and they will work with the police “to determine the origin of this horrific tragedy,” he said.

The driver of the truck, who was not immediately identified, was taken into custody, the police chief said. That person and any others found to be involved will face federal and state charges, Chief McManus said.

There were no further details about how long the truck had been in the Walmart parking lot, which is on the southwest side of the city, or where it had come from.

The fire chief said paramedics and emergency service workers arrived about 12:26 a.m. at the Walmart on the southbound side of Interstate 35. The police were already at the scene, and the air conditioner in the truck was not working, he said.

Of the survivors, he said, “our paramedics and firefighters found that each one of them had heart rates over about 130 beats per minute.”

“They were very hot to the touch,” the fire chief added. “So these people were in that trailer without any signs of any type of water, so you’re looking at a lot of heatstroke, a lot of dehydration.”

The truck may have held others. Some of the occupants fled into the woods nearby, and the police would search on foot and by helicopter when the sun came up, the police chief said.

Asked what residents in the area should do if they found people in distress from the truck, the chief said, “They need to call 911 right away.”

He added: “This is not an isolated incident; this happens quite frequently. Fortunately, we came across this one. Fortunately, you know, there are people who survived.”