You might want to brush up on your Geography.
Yes, I know Jefferson was Tripoli in Africa, but point holds.
The Barbary Pirates were attacking us and costing us a sizable chunk of money for ransom. And of course human lives.
Israel is a foreign country, and fully capable of taking care of Hamas.