The United States, Israel and the European Union consider Hamas, which seeks Israel’s destruction, a terrorist group. But it may be very difficult for the United States and the European Union to stop aiding the 1.5 million Palestinians in Gaza, no matter who their rulers, and divert all aid through Mr. Abbas, who would have little influence in Gaza.

Some on the Israeli right suggest Gaza is lost and should be treated like southern Lebanon, where Hezbollah rules another kind of mini, semi-state.

But some Palestinians believe that Fatah and Hamas may also come together again. Mr. Abbas says the emergency government will rule until new elections are possible — but Hamas will not accept early elections. And it may be that another Arab government, like Egypt or Saudi Arabia, will soon step in to try to patch together the nascent Palestinian state, which is in danger of collapsing.

Palestinians are unlikely to want to give up the idea of a Palestinian nation in both areas, with East Jerusalem as its capital. And Hamas has a significant number of followers in the West Bank, too, even if its fighters are far less well equipped and largely stay underground because of the Israeli occupation.

Hamas argues that it has purged the security forces of “corrupted elements” who were in league with Israel and the United States to harm the group. Hamas wants a restored unity government where the security forces would all report to the interior minister, effectively meaning Fatah would give up much of its remaining power.

In Gaza, Hamas began to settle scores. Its men executed a senior Fatah commander in the north, Samih al-Madhoun, who had vowed on the radio to kill scores of Hamas members. He was captured in an exchange of fire, brought to the house of a Hamas fighter killed in the exchange and executed, Hamas said.

Image A Hamas militant firing a rocket-propelled grenade at the headquarters of Fatahs Preventive Security Service in Gaza City today. Credit... Mohammed Saber/European Pressphoto Agency

More evident was the lack of Fatah leaders or commanders on the ground. The Gaza strongman Muhammad Dahlan, the former chief of Gaza’s Preventive Security who is now Mr. Abbas’s national security adviser, has been abroad for weeks for medical treatment. He returned to Ramallah on Thursday. His close ally, Gen. Rashid Abu Shbak, another former Preventive Security chief, is also outside the Gaza Strip, and the current Preventive Security head, Yussef Issa, was nowhere to be seen as the compound fell.