With roads destroyed and fuel scarce, many residents escaped on foot, in donkey carts or the few vehicles still functioning, carrying what possessions they could.
Israel said recent strikes targeted militants and infrastructure, blaming Hamas for civilian deaths.
Meanwhile, an Israeli blockade on food, medicine and other supplies is now in its third month, with global food security experts warning of famine across the territory of more than 2 million people.