In the summer of 2013, the Egyptian military carried out a coup d’etat against the elected Morsi government. Almost immediately, they severed ties with Hamas, and shortly thereafter they launched a military offensive against a Sinai militant faction, who they accused of both being in league with Hamas and the elected government.
Years later, the junta’s offensive in Sinai isn’t going so well, with the militant faction there having since joined ISIS, and become increasingly aggressive in launching attacks against government forces around the peninsula, and leaving open the question of whether Egypt would ever stabilize Sinai.
The junta is now trying to change tack by restoring ties with Hamas, hoping that relaxing restrictions on aid to the Gaza Strip and hosting top Hamas figures for meetings might improve Egypt’s reputation as a regional power with a lot of influence, and that this will in some way undercut ISIS.
It’s not clear that this has much chance of working, however, as Hamas has been at odds with ISIS for years, and fighting smaller ISIS affiliates within Gaza trying to take the strip over. Renewed Egypt-Hamas ties might just be one more excuse for ISIS to attack them.