Three immigrants triggered a security alert when they were spotted wandering through a dockland container terminal.
Hampshire Police later arrested the three on suspicion of being in the country illegally when they were discovered by staff at Southampton docks, staff at the terminal said.
A spokeswoman for DP World, which runs the terminal, confirmed the site was under lockdown from 3am to 7am as police and security conducted a sweep of the area following the discovery of the three foreign nationals.
She said: "They were found within the shack area after being noticed by a member of staff.
"A safety stop was put in place and the police were called. We carried out a full sweep of the terminal with police, who arrested three people on suspicion of entering the country illegally.
"All operations ceased until we carried out the sweep."
She said it was not clear exactly where the three arrested people originated from.
The arrests come as security services in England and France battle to restrict the number of people crossing the Channel illegally from Calais.