It had lost traditional allies in Syria, Iran, and Hezbollah. Most damaging, the ouster of former Egyptian President Mohamed Morsi’s Muslim Brotherhood government had deprived Hamas of its lifeline of supplies and armaments.