Change the law. Require immigrants to waive certain rights and agree to certain conditions as a condition of residency. Make immigrants probationary residents. Chip them with a GPS device (in locations not easily removed). If involved in terror, or suspected terror, ship them back without benefit of trial.
If they are already citizens, re-institute the draft. Any citizens involved in terror, or suspected terror, are subject to immediate and mandatory military service. If they refuse to serve, incarcerate them for draft dodgers for an indefinite period (to be served in the Tristan da Cunha, Pitcairn Islands, or something similar). If they agree to serve, then ship them out to serve their country in the same remote islands, without benefit of military training. There they can be put to productive use, like making a proper naval fortification via manual labor (not machines), and taught how to act like proper citizens. If they object, they can be given the option of renouncing their citizenship and returning to the land of their forefathers, with a GPS chip implanted.