Iran was able to build up Hamas
Make no mistakes, the Iranian regime doesn't really like Hamas. They're nothing more than the enemy of their enemy, but on philosophical and political terms they'd rather be enemies than friends. Hezbollah is another thing, seeing how they're Shi'ite.