Thousands rounded up under emergency powers two weeks ago are being freed.