Not analogous....North Korea, Iraq, and Iran were our enemies.
And guess what..they still are!
Furthermore...Hamas IS Iran.
Iraq is no longer an enemy. We have diplomatic relations with Iraq but not Iran or North Korea. Our embassy in Iraq is the largest in the world in terms of number of people assigned.