Brothern
Hamas, the government, is explicit in this.
Hamas is not the government.
Hamas won legislative elections and found that nobody in the government, consisting mostly of Fatah (surprise!) was following their orders.
They decided to start issuing legislative orders and laws like the creation of a new security force answerable to the legislature and not the executive. Understandable the executive and Fatah didn't like that and tried to regain control of Gaza.
The resulting civil war has seen a state of emergency put in place and the Hamas run legislature dissolved.
Hamas runs Gaza the way it has always "run" Gaza, with Guns. Only now they've kicked Fatah out so they also have to run all the pre-existing government operations too.