Well, it wasn't long after the founding of the United States that we had foreign troubles. Around 1800, we were paying tribute to the Barbary pirates until we built a navy and sent the Marines into Tripoli.
And then there was the War of 1812, and then the Mexican War in the 1840s.