In response to the devastating Oct. 7 attack on Israel by Hamas, the group that controls the Gaza Strip, Israel imposed what it called a complete siege — cutting off almost all water, food, electricity and fuel for the more than two million Palestinians living in Gaza. It also launched thousands of airstrikes on the enclave and sent in ground forces to try to root out Hamas.

A brief cease-fire, the first since the war began seven weeks ago, began to take hold on Friday, and as part of a hostage agreement between Israel and Hamas, dozens of trucks with water and other vital humanitarian aid crossed into Gaza.

Still, it was far less than what typically came into the territory before the war, and there was no indication that the freer flow of aid would last beyond the four-day agreed truce.

Before the cease-fire, little humanitarian aid — far short of what Gazans need — had been trickling in. And so, from the north to the south, in tented camps, apartments, schools and hospitals, residents crammed together in ever-shrinking spaces have been struggling every day to meet their most basic needs.

Surviving has become a full-time, perilous undertaking.

Days start well before dawn. Tasks seem simple: Fetch water. Bake bread. Buy diapers. Stay alive.

But people do not always succeed.

Mineral water trucked into the territory in aid convoys has been enough for only 4 percent of the population, according to the United Nations World Food Program. Some desalinated water is still being distributed in the south, but the north has no potable water sources left, according to the U.N. People who cannot access the scarce mineral and desalinated water rely on brackish water from wells, which the U.N. has said is not safe for human consumption.

Flour, too, is running out and most wheat mills have been bombed, according to the United Nations. Humanitarian agencies have managed to deliver bread, canned tuna and date bars to about a quarter of the population since Oct. 7, but distribution is hampered by fighting and the siege, the World Food Program said. Some farmers are slaughtering their animals, trading their future livelihoods for the emergency at hand.

The World Food Program has warned that only 10 percent of the food Gaza needs has entered the territory since the war began, creating “a massive food gap and widespread hunger.”

“Wheat flour, dairy products, cheese, eggs and mineral water have completely disappeared,” in the market, Alia Zaki, a spokeswoman for the World Food Program, said this month.