Yes, but we really didn’t do so well against the state sponsor s of terrorism back then. It took action by the Europeans to eliminate the Barbary pirates by eliminating the states that sponsored the terror.
In the way Lt. Stephen Decatur did in 1804, at least.