All I know is Hamas rules at least some subset of the Palestinian people, and has for seventeen years. They were elected back then, but there have been no elections since.
A non-elected government ruling people who are prevented from owning weapons has, predictably, resulted in Hamas having enormous contempt for the people they rule, and using them as civilian cannon fodder.