A top Texas official said that sanctuary cities were to blame for the deaths of ten people in a San Antonio truck that was used to "smuggle" people across the US-Mexico border.

Lieutenant Governor Dan Patrick wrote in a Facebook post that the "tragedy" proves "sanctuary cities entice people to believe they can come to America and Texas and live outside the law."

Sanctuary cities in New York, New Jersey, California, and other border states limit their cooperation with federal immigration authorities seeking out undocumented immigrants for deportation.

Thirty-nine people were found in the trailer of a truck parked at a Wal-Mart store, overheated. Eight were already dead and two more have died in hospital. They were allegedly trying to cross over the border illegally.

The lorry driver - James Bradley of Clearwater, Florida - has been charged with people smuggling and could face the death penalty if convicted.

"Today, these people paid a terrible price and demonstrate why we need a secure border and legal immigration reform so we can control who enters our country," he wrote.

Seventeen victims, some young as 15, were taken to hospital with life-threatening injuries after being in the trailer for an unknown amount of time in the Texas summer heat without air conditioning.

The "undocumented aliens," as they were identified by police, included Mexican and possibly Guatemalan citizens.

City Fire Chief Charles Hood said some of the victims could have "irreversible brain damage" as a result of heatstroke.

These people are usually fleeing violence and rampant poverty in their native countries only to face a treacherous entry into the US through the Rio Grande river or deserts.

The San Antonio lorry is not an isolated case. Earlier in July, undocumented immigrants were discovered in a truck in Houston after banging on the locked doors for rescue. In 2003, 19 people died in an abandoned truck in Victoria, Texas.

Mr Patrick's comment comes during Donald Trump's continued push for increasing border security and building a nearly 2,000-mile wall, the bill for which he has repeatedly said Mexico would pay.

Sargeant Jesse Salame of the San Antonio police said that the victims will likely have to be turned over to US Immigration Customs and Enforcement once recovered. Their fate is unknown at this point.