Two men have been taken to hospital after 18 people, all believed to be Iraqi nationals, were found in the back of a lorry in sweltering heat.
The people in the back of the lorry waved to alert passing motorists who flagged down the driver to stop on the A22 in East Grinstead, West Sussex, at around 9.20am on Saturday.
Emergency services helped free the group from the back of the HGV.
A man and a woman were taken to hospital suffering from dehydration. The others were provided with water and medical aid, Sussex Police said.
The nearby Trinity Methodist Church was used as a refuge centre as immigration officers arrived.
The lorry driver, a 63-year-old man of no fixed address, was arrested on suspicion of facilitating illegal immigration and remains in police custody.
Six people claiming to be children were passed to social services to have their age assessed.
A Home Office spokesman said: "All will be processed in line with immigration rules."
With temperatures in East Grinstead hitting 25C (77F) on Saturday, police said it was vital that they reacted quickly to free the stowaways from the lorry.
Sergeant William Keating-Jones, of Sussex Police, said: "Our priority was for the welfare of the occupants who were in the back of the lorry. The vehicle was exceptionally hot and it was important we reacted quickly.
"This was a great multi-agency response to a potentially life-threatening situation, with emergency services, immigration officials, volunteers and even local residents all pulling together.
"We were also mindful of causing minimal disruption to motorists, and the road was closed for about 20 minutes while we were at the scene."