The usual procedure for such cases of detention (which falls short of an arrest, which has to be sanctioned by a court) is to identify the individuals for potential administrative action and then release them.