In 1942, six German soldiers came ashore in NYC from a U Boat with the intent to sabotage US infrastructure. They were caught almost immediately and five of them were tried and executed two months later.
https://en.wikipedia.org/wiki/Operation_Pastorius