Still, many fled only when shells began flying. Israeli officials speculate that Hamas militants have threatened people with retaliation if they leave, using them as human shields. Gazans did not mention such threats as a factor — though some said that they did not feel free to criticize Hamas.

Such fears did not seem to deter 81,000 people who have already fled to United Nations shelters, and tens of thousands more who have gone to relatives’ homes. But Hamas may have misled people into a false sense of safety. It proclaimed on radio and television that the Israeli warnings were part of a psychological operation, and urged people to ignore them. Some were surprised at how far west into the areas that received warnings the Israelis pushed on Sunday, having reasoned that only the eastern areas, closer to the border, would be seriously threatened.

Another factor is that Gaza’s extended families can include dozens of people — half of all residents of Gaza are children — and moving is not as simple as packing a bag and running. Families are deeply rooted in their neighborhoods, and many lack potential hosts elsewhere.

The Attars thought of selling their farmland near the Israeli border, to move somewhere safer, but they could not afford apartments in Gaza City, where the scarcity of land, especially near the sea, drives prices high.

Also, the family depends on the land, growing vegetables and raising poultry for food and to make a living. And, Ms. Attar said, “It’s not just a house to sell and buy another; it’s our life and our grandparents’ life.”

Under fire in Shejaiya, some residents said they simply did not want to heed the orders of a foreign government they consider an occupier, and preferred to stay in their homes. One man on Sunday, having escorted his family out from under shelling, declared, “I’m going back, I’m not afraid,” and began marching back into the smoking neighborhood. Only after his sister ran after him, pleading, did he reconsider.