Unfortunately, such extremes may become necessary.
A country's foremost responsibility is to its citizens. If it cannot protect its citizens or give its citizens the means through which to protect themselves from foreign harm, then the citizenry has no reason to abide by the laws of said Government and that government has failed.
I would much prefer not to have such consequences to those that come illegally to the United States, but it would be akin to letting others come into my house and abuse my family and that cannot be allowed in any measure.