DEIR AL-BALAH, Gaza Strip — Desperate Palestinians scrambled for escape from northern Gaza on Saturday or huddled by the thousands at a main hospital in the target zone in hopes it would be spared, as Israel intensified warnings of an imminent offensive by air, ground and sea following Hamas militants’ deadly rampage in Israel a week ago.

Israel dropped leaflets from the air and redoubled warnings on social media for more than 1 million Gaza residents to move south, while Hamas urged people to stay in their homes. The Israeli military said it is trying to clear away civilians ahead of a concentrated assault on Hamas militants in the north, including in what it said was their underground hideouts at Gaza City.

The U.N. and aid groups say such a rapid exodus along with Israel’s siege of the territory would cause untold human suffering. Gaza’s humanitarian crisis already was mounting Saturday amid a growing shortage of water and medical supplies under a week-old Israeli blockade, which has also forced electrical plants to shut down without fuel.

In Gaza City, Haifa Khamis al-Shurafa crowded into a car with six family members, fleeing to the south in the darkness.

“We don’t deserve this,” Shurafa said, before leaving. “We didn’t kill anyone.”

The evacuation directive covers an area of 1.1 million residents, or about half the territory’s population. The Israeli military said “hundreds of thousands” of Palestinians had heeded the warning and headed south. It gave Palestinians a six-hour window that ended Saturday afternoon to travel safely within Gaza along two main routes.

In Israel, meanwhile, workers at a military base received special rabbinical approval to continue identifying bodies of the more than 1,300 people, most civilians, killed by Hamas. Work is normally halted on Saturday, the Jewish Sabbath.

Prime Minister Benjamin Netanyahu visited Be’eri and Kfar Azza, two southern border communities where Hamas militants slaughtered dozens of Israelis in their initial attack, to meet with soldiers and tour the ruins of bloodied homes. Netanyahu has faced criticism that his government has not done enough to meet with relatives of the victims.

Hundreds of relatives of the scores of Israelis and foreigners captured by Hamas and taken to Gaza gathered outside the Israeli Defense Ministry in Tel Aviv, demanding the release of their loved ones.

“This is my cry out to the world: Please help bring my family, my wife and three kids,” said Avihai Brodtz of Kfar Azza.

Many expressed anger toward the government, saying they still have no information about their relatives.

In a nationally broadcast address Saturday night, Israel’s chief military spokesman, Rear Adm. Daniel Hagari, accused Hamas of trying to use civilians as human shields and issued a new appeal to Gaza residents to move south.

“We are going to attack Gaza City very broadly soon,” he said, without giving a timetable for the attack against the 25-mile-long territory.

“The Palestinian civilians in Gaza are not our enemies,” an Israeli military spokesman, John Conricus, said. “We don’t assess them as such, and we don’t target them as such. We are trying to do the right thing.”

Israel has called up some 360,000 military reserves and massed troops and tanks along the border with Gaza.

Palestinian militants have fired more than 5,500 rockets into Israel since the fighting erupted, the Israeli military said.

Hamas remained defiant.

In a televised speech Saturday, Ismail Haniyeh, a top Hamas official, said that “all the massacres” will not break the Palestinian people.

Fighting continued in the run-up to the expected offensive, with Hamas launching rockets into Israel and Israel carrying out strikes in Gaza.

An Israeli airstrike near the Jabaliya refugee camp in northern Gaza killed at least 27 people and wounded another 80, Gaza health authorities said.

Most of the victims were women and children, the authorities said.

It was not clear how many Palestinians remained in northern Gaza by Saturday afternoon, said Juliette Touma, a spokesperson for the U.N. agency for Palestinian refugees. An estimated 1 million people have been displaced in Gaza in one week, she said.

At Gaza City’s main hospital, Al-Shifa, a crowd of men, women and children that medical officials estimated at 35,000 crammed into bloodied hallways and hospital grounds, sitting under trees as well as inside the building’s lobby, hoping to be protected from the fighting.

“People think this is the only safe space after their homes were destroyed and they were forced to flee,” said Dr. Medhat Abbas, a Health Ministry official.

Basic necessities like food, fuel and drinking water were running out because of the complete Israeli siege.

“Gaza has been out of water for almost three days, we have no power, no electricity,” said Inas Hamdan, a spokesperson for the U.N. agency for Palestinian refugees.

“If there is no humanitarian corridor, consequences will be catastrophic,” Hamdan added.