The incident comes amid a power struggle between the ruling group Hamas of Prime Minister Haniyeh and the more moderate Fatah party of Palestinian President Mahmoud Abbas .