As the Khoswan family slept, the Israeli military dropped three GBU-39 bombs into their sixth-floor apartment. One of the bombs exploded just outside the parents’ bedroom, leaving the apartment looking as if a tornado had swept through, killing three family members.

But they were not the stated target of the attack earlier this month.

The Israeli military had dropped the bombs into their home to assassinate a commander of the Palestinian armed group Islamic Jihad who lived in the apartment below.

Jamal Khoswan, a dentist, Mirvat Khoswan, a pharmacist, and their son, a 19-year-old dental student, were killed in the strike as well as the Islamic Jihad commander who lived downstairs, Tareq Izzeldeen, and two of his children, a girl, 11, and a boy, 9.

“Commanders have been targeted before,” Menna Khoswan, 16, said this month at a memorial service for her father at the hospital where he served as chairman of the board. “But to target the commander and those around him, honestly this is something we didn’t expect.”

Israel says that it conducts “precision strikes” aimed at taking out armed groups’ commanders or operation sites, and that it does not target civilians. But the airstrikes are often conducted in heavily populated areas, and many Palestinians in Gaza say they amount to a collective punishment aimed at making them fearful about who their neighbors might be.

Israel also destroys entire residential buildings or towers if it believes an armed group has an office or apartment there, although it usually issues an evacuation warning beforehand.

Menna’s parents and brother were among at least 12 civilians killed by Israeli strikes during five days of fighting between Israel and Islamic Jihad this month, according to the Palestinian Center for Human Rights. Israel says that nine civilians were killed in the strikes.

Six senior leaders of the armed group that Israel said had been responsible for rocket attacks on Israel were killed before a cease-fire was reached on May 13. The Israeli military said that Islamic Jihad had launched nearly 1,500 rockets indiscriminately toward Israel over the course of several days. Two people were killed in Israel, including an Israeli woman and a Palestinian worker from Gaza.

Members of the Khoswan family say they knew that an Islamic Jihad commander lived in the apartment below them and worried that he could be the target of an Israeli strike. Israel has designated Islamic Jihad as a terrorist organization — as have countries including the United States and Japan — and has regularly targeted its leaders and fighters.

Yet the Khoswans never thought their apartment would be hit while they were inside, Menna said, describing the shock of being awakened by the explosions ripping through her home.

The Israeli military said it had twice postponed the assassinations of the three Islamic Jihad commanders to ensure suitable operational conditions and minimize civilian casualties. But the military did not respond to questions about why it had targeted the three Islamic Jihad commanders on May 9 while they were at home or why it had launched the three bombs targeting the Islamic Jihad commander through the Khoswan home.

The Israeli military “didn’t choose to kill the dentist,” said Nir Dinar, an Israeli army spokesman, declining to comment further.

The Israeli military released videos of the strikes it carried out, including one showing a man it accused of having fired rockets at Israel being struck in the middle of a road on a bicycle. Another showed a man walking in the courtyard of a complex of buildings for several seconds before entering a building. Once he went inside, the building was blown up.

The military said the videos showed how it had waited for targets to be alone before striking.

During the five days of fighting this month, Israeli strikes destroyed 103 homes, and more than 2,800 others were damaged, according to Gaza’s public works department.

Amnesty International has previously said that Israel’s pattern of attacks on residential homes in Gaza displayed a disregard for the lives of Palestinian civilians and could amount to war crimes or crimes against humanity.

In the 11-day 2021 war between Hamas and Israel, Israel struck four tower buildings, destroying three of them; one had housed some of the world’s leading news media organizations, including The Associated Press and Al Jazeera.

The Israeli military said that it had destroyed the tower because the building also contained military assets belonging to Hamas, the political and armed group which controls and governs Gaza. The A.P. reported that at the time that the tower’s owner had been “told he had an hour to make sure everyone has left the building.”

Fearing that Israel would destroy entire buildings because they contained offices or homes belonging to members of armed groups, residents of some buildings posted signs in their lobbies warning against renting to departments linked to the Hamas-led government.

Israel has long accused Palestinian armed groups in Gaza of hiding among civilians and using them as human shields. Because the armed groups are homegrown, they live side by side among the people and their command centers are spread throughout Gaza.

Leaders and members of the groups say that Israel’s airstrikes are aimed at hurting the civilian population to undermine public support for them. The groups have wide support among Palestinians for their resistance to the Israel.

Since the 2021 war, Hamas says it has begun moving its offices away from important infrastructure such as hospitals and schools.

Khaled al-Batsh, an Islamic Jihad leader in Gaza, said his group’s members lived in their own communities in the tiny enclave that is home to more than 2.3 million people.

“Where should we go? Should we flee Palestine? Can we go set up a military base in Colorado?” he said. “They target the civilians so they can pit people against us.”

South of Gaza City, Ghada Abu Ebeid, 50, this month was living with a relative near the remains of her family’s two-story house, which was destroyed by an Israeli bomb in the recent fighting that also sheared off the fronts of nearby buildings.

An hour before the strike, the Israeli military warned residents up to 100 meters away to evacuate their homes, according to the Abu Ebeid family and neighbors.

When asked about the attack, the military referred to a statement saying that it had targeted Islamic Jihad command-and-control centers from which they operate and direct rockets toward Israel.

Ms. Ebeid would not say why she believed Israel had demolished their home. Neighbors said that one of her sons was a member of Islamic Jihad.

Many Gaza residents acknowledge that they do worry about who might move in next door, fearing that their neighbors could become targets. But they put the blame squarely on Israel.

“What kind of precision is this when you kill civilians?” said Asmahan Adas, referring to a strike on the home of her next-door neighbor, Khalil al-Bahtini, another Islamic Jihad commander, that also killed her two teenage daughters. “When Israel wants to kill someone, they can find many different ways to kill, but they want others to die along with their target.”

Ms. Adas said that when she knew Mr. Bahtini was at home, she would move her two daughters to the far side of their home, fearing that Israeli bombs could destroy the rooms closest to him.

On the night of May 9, she was unaware that Mr. Bahtini had returned home. Before she went to bed, Ms. Adas said good night to her two daughters, Iman, 17, and Dania, 19, who were sitting on their beds, watching cellphone videos and laughing, she said.

Minutes later, shortly after 2 a.m., three GBU-39 bombs pierced the roof of Mr. Bahtini’s second-floor home, killing him, his wife and 5-year-old daughter. The blast also ripped through the bedroom of Ms. Adas’ teenager daughters, burying them in rubble.

A week later, Ms. Adas wept as she received mourners at her parents’ house. Dania was to be married on July 21. Now, her fiancé visits her grave every day to talk to her.

“I had dreams of taking my daughter out of our home in her wedding dress, not in a burial shroud,” Ms. Adas said. “They took everything from me in a second, just so they could kill one person.”

Ameera Harouda contributed reporting.