Arrested foreigners ‘had terror links’