The Alien Enemies Act of 1798 can be invoked if the US is at war with another country or a foreign nation has invaded the US or threatened to do so.