Four foreigners detained for alleged ISIL links