Visiting the Gaza Strip is always a surreal experience, but I don’t think I’ve ever seen it quite so desperate and chaotic. After Hamas’s lightning conquest of the territory last week, the Islamists were trying their best to present an image of calm and control to the world. The group’s leaders ordered fighters to take off their black ski masks and stow most of the Kalashnikovs and RPGs. Traffic cops in fluorescent yellow vests and green Hamas baseball caps had been dispatched to busy intersections to channel the snarl of taxis. Hamas leaders insisted they would grant amnesty to any Fatah security personnel who wanted to come back to work. “We are going to help them reconstruct themselves,” Hamas cofounder Mahmoud Zahar said later Wednesday afternoon at his bullet-pocked house, which had been fortified with concrete blast walls and sandbagged sniper nests spilling over the edges of the roof. “We are controlling everything now.”

Still, even Zahar must know that once the euphoria wears off, the Islamists are almost certainly due for a humbling lesson in real-world management. Maintaining order in a 25-mile strip of land choked with 1.4 million impoverished Palestinians is a daunting task for even the most disciplined and efficient of organizations. Governing will be all the more difficult while fighting periodic skirmishes with Israeli troops stationed just across the border. Earlier this week, Israeli and Palestinian soldiers exchanged gunfire at the busy Erez Crossing, and on Wednesday Israeli forces killed six more Palestinians in Gaza and the West Bank. American officials have pledged vigorous support for President Mahmoud Abbas’s forces in the West Bank, and Hamas activists could face further arrests there, where Abbas’s Fatah faction remains relatively strong. Meanwhile, dozens of Gazans are still trying to flee the fighting; on Wednesday Israel allowed more than 50 residents to pass on a bus to Egypt, although others remained stranded at Erez.

The Erez Crossing is a creepy place, even in the best of times. The walls of the concrete tunnel that leads from Israel to Gaza are chewed with the charred pockmarks of past shooting attacks; brass M-16 casings litter the floor alongside the pulled pins of smoke grenades. At a series of locked gates along the way, the disembodied voices of Israeli soldiers bark confusing orders over loudspeakers, instructing you to open your bags, take everything out of your pockets, raise your arms. On past trips to Gaza, a Palestinian policeman has checked my passport on the far side, and then waved me in. But this time I was thrust into a scene of frenetic activity almost as soon as I stepped across the border. Dozens of Palestinian kids were hanging from the green steel rafters of the tunnel, swinging axes and hoisting blowtorches—stripping even the tunnel itself of any metal that could possibly sold for scrap.

After stopping at Dahlan’s house, we drove by the Preventive Security headquarters he once controlled. Like the Fatah leader’s house, the building had been completely burned, hacked to pieces, and stripped of furniture. The charred résumés of Rashid Abu Shbak, another top Preventive Security officer, littered the floor of the complex. Broken glass crunched under our feet, and the entire building smelled like a marshmallow roast gone bad. We walked toward the prison complex in the back—a row of tiny white cells with eight-inch peepholes that once held some of Gaza’s most prominent Islamists, including Mahmoud Zahar. On the wall of one of the cells, someone had scratched the words AL QAEDA IN PALESTINE in Arabic.

As Hassan and I began to walk out of the jail, we heard what sounded like a fist banging on one of the steel doors inside the jailhouse. “Hey!” a voice shouted in Arabic. “Let me out!” We asked the man what he was still doing in jail while everyone else had gone. “I’m a thief!” he cried. “Please open the door.” That didn’t seem like a good idea. The prisoner told us he had been looting the Preventive Security complex and the new Hamas guards locked him up. Hassan asked whether he belonged to Fatah or Hamas. “I’m Hamas, but tomorrow I’m going to be Fatah,” he griped. As we walked away, we could hear the thief quietly singing in Arabic: “We are the nation of freedom….”

Our last stop of the day was the home of Mahmoud Zahar’s younger brother Yussef, a former militant in Hamas’s Izzedine al-Qassam militia. Yussef, like his brother Mahmoud, was dressed in a pale gray linen safari suit, which made the brothers look unfortunately like Gazan versions of Dr. Evil from the Austin Powers movies. I didn’t think it was a good idea to tell them that. Instead we sipped sweet tea and talked about the difficulty of the job Hamas has ahead of it.

Yussef’s grandson, a chunky, bald toddler, climbed up onto his lap. I asked how an isolated Hamas would ever get the money it needed to run the territory. He answered my question with a warning. “Don’t put a lion in a corner, or he will bite,” Yussef said. If the sanctions continue, “the victims will not be in the Gaza Strip only. They will be everywhere. Because we want to live. Do you believe I will give you a chance to live, and I will die? If I don’t find food, I will eat men. If I am hungry, I will eat you.” He looked at me for a second and then cracked a smile. “Don’t worry,” he said. “We still have food.” We all laughed, a little too hard, the way you laugh at something that is not really a joke at all.