There *was* an imminent threat to public safety and the clause *is* applicable in this case.
Why?
The authorities had to ensure that he is not part of a larger cell or that additional bombings or attacks were not in the works or already in place hidden elsewhere that had yet to be discovered.
__________________
|