On a day rattled by a fury of air attacks, Israel and Hamas were searching for a way forward Wednesday, with a senior Israeli military official declaring that a ground invasion of Gaza was a “very high possibility.”

Israel announced that it will observe a unilateral “humanitarian truce” for five hours Thursday to allow Gaza residents to stock up on food and other supplies and let aid reach civilians. The pause in fighting was requested by the United Nations, said another military official, army spokesman Lt. Col. Peter Lerner.

It was initially unclear whether Hamas would also hold its fire. The militant group rejected an earlier cease-fire proposed by Egypt, and a top Hamas leader declared that the Islamist militant group is alone in the world as it battles Israel. By Thursday morning, a Hamas spokesman said they would honor the brief truce, according to news agency reports.

Hamas continued to shower rockets Wednesday into southern and central Israel, including Tel Aviv, underscoring the extent to which the militants believe they still have the military capability to persuade Israel to accept their terms, analysts said.

“From their rationale, they are holding strong, as if they have nothing to lose,” said Miri Eisen, a former Israeli army intelligence official. She added, “If they feel they have nothing to lose, they can continue this for a long time.”

Rockets fired from Gaza as the five-hour humanitarian truce ends and Israel prepares for launching a ground offensive in Gaza. (Reuters)

That attitude is increasing pressure on Israel. Hundreds of Israeli airstrikes have killed hundreds of Palestinians but have done little to stop Hamas rockets from striking Israeli towns. Human rights activists are accusing Israel of killing innocent civilians and possibly committing war crimes. Egypt, once a reliable ally, no longer seems to have the negotiating clout it once had.

All this is generating discussions — within Israeli political and military circles and on television, radio and editorial pages — of a possible ground invasion of Gaza in the coming days. In Tel Aviv, a high-ranking Israeli military official told reporters Wednesday that there was “a very high possibility” of such an operation, adding, “If you want to efficiently fight terrorism, you need to have boots on the ground.”

More than 113 rockets were fired from Gaza into Israel on Wednesday, according to the Israeli military.

By Wednesday night, 222 people had been killed in Gaza during the nine-day operation, including 49 minors and 24 women, according to the Gaza Health Ministry. More than 1,600 people have been wounded in Gaza, the officials said.

Among the latest casualties were four Palestinian children, all younger than 12, who were killed by an Israeli missile or shell while playing on a beach in Gaza near a hotel used by foreign journalists, according to witnesses and Palestinian officials. The four boys were cousins. Seven others — adults and children — were reported wounded in the strike.

The Israeli army, calling the incident tragic, said the target had been a Hamas operative.

President Obama addressed the situation in brief White House remarks. Although he did not specifically mention the beach deaths, he said, “We are all heartbroken by the violence . . . especially the death and injury of so many innocent civilians in Gaza.” Obama said the United States would continue to “use all our diplomatic resources and relationships” to bring about a lasting cease-fire. “In the meantime,” he said, “we are going to support efforts to protect civilians in Israel and Gaza.”

For the first time in the conflict, Israel on Wednesday used its airstrikes to target the homes of top Hamas political leaders. They included Mahmoud Zahar, a founder of Hamas who played a prominent role in the Islamist militant group’s 2007 takeover of Gaza.

The strike on Zahar’s four-story house toppled its facade into the garden. Zahar was nowhere to be found Wednesday; he fled before the Israeli operation began and is assumed to be in hiding.

A neighbor, Ahmed al-Jarosha, said: “We knew when the cease-fire was rejected that we would start to see the Israelis hit political leaders. It is no surprise.”

The homes of three other Hamas leaders who are also members of the Palestinian Legislative Council were hit by airstrikes early Wednesday. None of politicians was injured.

In another possible signal of its intentions, Israel urged tens of thousands of Palestinians in Gaza to evacuate border areas.

Hamas leaders called for Gazans to remain in their homes. The militants did not stop evacuees from leaving but did not assist them. Hamas doctrine holds that those who abandon a neighborhood are following the orders of the occupiers.

“What is the real problem? Hamas asking people to stay in their own homes? Or the Israelis threatening their lives if they stay in their homes?” said Mushir al-Masri, a Hamas political leader.

Israelis condemn the practice as a cynical use of human shields. Israeli Prime Minister Benjamin Netanyahu has said, “We are using missile defense to protect our civilians, and they’re using their civilians to protect their missiles.”

Israel came under sharp criticism Wednesday for its tactics. The watchdog group Human Rights Watch said Israeli air attacks in Gaza were targeting civilian structures and killing civilians, acts that could constitute war crimes. Israel has denied such allegations.

Hamas and other Palestinian militants boast that if there is a ground invasion of Gaza, they would use it as an opportunity to prove their mettle, saying that Israeli airstrikes would cease during the invasion and Israeli soldiers would be vulnerable to attack.

“It is best when the Israeli soldiers come to us,” said Abu Ahmed, chief spokesman for the militant group Islamic Jihad, whose rocket arsenal and numbers of fighters in Gaza are second only to Hamas.

“We know the terrain. It is our land,” he said.

Others in Gaza warn that a ground incursion by Israel would create a humanitarian crisis and a potential bloodbath. “It would be a catastrophe,” said Mkhaimar Abusada, a political scientist at Al-Azhar University in Gaza.

Hamas has struggled as a government to deliver a better life for the people of Gaza. Its military wing has achieved some success in the current conflict: Its rockets reached farther than before, causing air sirens to sound repeatedly over Tel Aviv and Jerusalem, and Hamas managed to penetrate Israeli airspace with a drone.

“But Hamas today as a military doesn’t have much beyond rockets, and the arsenal is not renewable” because the smuggling tunnels from Egypt are closed and Israel does not allow Gaza to have a seaport or airport, said Ibrahim Ibrash, a former culture minister in Gaza.

Hamas also finds itself more isolated than ever. Standing in front of the Shifa Medical Center, Gaza’s largest hospital, Hamas spokesman Sami Abu Zuhri complained that Gaza and Hamas have been abandoned even by their brothers. “The Arab world has done nothing. The Arab world is silent about Gaza.”

Hamas leaders now openly heap scorn on Egypt’s new government, headed by President Abdel Fatah al-Sissi, and complain that Cairo is working closely with the Israelis to crush the Islamist movement. “The Egypt media attacks Gaza. Shame on you. The Arab position is shameful,” Abu Zuhri said.

Booth reported from Gaza, and Eglash reported from Tel Aviv. Karen DeYoung in Washington contributed to this report.