Three children are recovering in hospital after Austrian police stopped a truck near Braunau, on the German border, with 26 people from Syria, Afghanistan and Bangladesh crammed inside.
They said that three severely dehydrated small children were among the passengers, and were taken to a hospital.
"According to doctors, they would not have withstood this ordeal for very much longer," police official David Furtner told the Austria Press Agency. The suspected smuggler, a 29-year-old Romanian man, was arrested.
About 150,000 migrants have been detained already this year in Hungary, more than triple the figure recorded in all of 2014. Many apply for asylum but leave for richer countries in the European Union like Germany before their requests are decided.
Others try to avoid the police and frequently rely on human traffickers to continue their journey toward the West.
The discovery was revealed as four men suspected of being involved in the deaths of 71 migrants found in another truck in Austria were placed under preliminary arrest by a Hungarian court.
The preliminary arrests will be in place until the suspects are indicted or September 29, at the latest, said Ferenc Bicskei, president of the Kecskemet Court.
The court agreed with prosecutors that the severity of the crime and the risk that the suspects would flee justified their arrest. Mr Bicskei said the four suspects appealed the decision, saying they had not committed any crimes.
The three Bulgarian suspects are aged 29, 30 and 50, officials said, while the fourth suspect - an Afghan - is 28 years old.
The refrigerated truck with the dead migrants was found on Thursday in the safety lane of the main Budapest-to-Vienna highway. The suspects were detained later that day in southern Hungary, near the border with Serbia, where Hungary is building a 4-metre high fence.
The case is being heard in Kecskemet, in central Hungary, because the truck set off from that city before picking up the migrants near the border with Serbia, Gabor Schmidt, a spokesman for the Bacs-Kiskun county chief prosecution office, told reporters.
Mr Schmidt said Hungarian authorities are investigating the suspects' involvement in the human trafficking aspects of the case, while their suspected connection to the deaths of the migrants is being investigated by Austrian authorities.
He said the prosecution strongly suspects the four men cooperated in the transportation of the migrants from Hungary to Austria, adding that human smuggling carries a sentence of between two and 16 years in prison.
The four handcuffed men were taken into the court building through a side entrance.
The defence lawyers of the suspects were not present and will be notified of the court decisions, court spokesman Szabolcs Sarkozy said.
It was not clear how long the bodies had been inside the truck, but police believe the migrants may already have been dead by the time the truck crossed into Austria overnight on Wednesday. Austrian officials believe they suffocated.
Autopsies were being conducted, with results expected in several days.