Hamas won all-Palestine elections. Since the whole point of creating Hamas was to split the Palestinians, Israel and the West allowed them to take power in Gaza while encouraging the existing power-structure in the West Bank to ignore the results of the election and carry on as if Hamas had lost. And then they represented the fact that Hamas had power in Gaza as some sort of illegitimate coup.