The measure stems from the case of a Moroccan student in the German state of North Rhine-Westphalia , who challenged scanned data on five million men who were profiled following the 2001 terror attacks on the United States .