JERUSALEM — Israeli forces struck multiple targets controlled by the ruling Hamas faction in the Gaza Strip on Saturday after rockets were fired from the territory, potentially jeopardizing a shaky cease-fire following two days of intense exchanges.

The flare-up occurred as Israel’s military said it was investigating one of the deadliest attacks of the recent fighting, a strike on a family house Thursday that may have been a case of mistaken targeting.

Saturday’s strikes marked the first time Israel had hit Hamas sites during the recent clashes, having limited its previous attacks to assets of a rival faction in Gaza, Islamic Jihad. Hamas, in a departure from previous episodes of violence, had largely stayed out of the fray.

But the army said that changed in the early hours Saturday when at least two rockets soared toward the Negev Desert city of Beersheba, sparking air raid sirens shortly after 1 a.m. Both projectiles were shot down by Israel’s Iron Dome air defense system.

Hamas did not claim responsibility for the launch. But the Israeli military said the rockets came from Hamas launchers and retaliated with air attacks on a Hamas military camp, a naval facility and “an underground terror infrastructure,” according to a statement.

“Hamas fired tonight, aiming to kill Israeli civilians, and therefore we fired back at their military targets,” Lt. Col Jonathan Conricus, a spokesman for the Israel Defense Forces, said in an interview.

The week’s hostilities, which saw 34 Palestinians killed and sent Israelis to bomb shelters as hundreds of rockets rained down, began Tuesday after Israel killed an Islamic Jihad commander in Northern Gaza with a pinpoint strike on his bedroom. His wife was also killed.

Israel blamed the commander, Baha Abu al-Ata, for most of the rocket attacks and other terrorist activity emanating from Gaza in recent months and said he was actively preparing to launch more. After two days of attack and reprisal between Islamic Jihad and Israel, an Egyptian-brokered cease-fire Thursday mostly ended the barrage.

Israeli officials had hailed the precision effectiveness of the campaign, which damaged Islamic Jihad’s military capacity, killed 25 active militants and resulted in minimal civilian casualties, according to the army.

But those claims were upended Friday when it became clear that one of the final strikes of the operation destroyed not a vacant militant target but the home of a family, killing eight, including five children.

An IDF spokesman initially claimed one of the men killed, Rasmi Abu Malhous, was an Islamic Jihad commander. But neighbors of the family told media in Gaza that the man had no affiliation with the militant group.

IDF sources further told Israeli media they thought they were targeting an empty structure that had military value and did not expect it to be occupied by a family. The military has launched an investigation.

“According to the information available to the IDF at the time of the strike, no civilians were expected to be harmed as a result of the strike,” the IDF said in a statement. “Initial information showed that an Islamic Jihad operative was killed in the strike, apparently a commander in the Islamic Jihad rocket unit. . . . The subject of his identity, as well as the harm caused to civilians by the strike, is being further reviewed.”

Two sandy pits were all that marked the site of two adjacent houses destroyed in the attack in Deir al-Balah, a rural section of Gaza. Almost no traces remained of the tin and plastic structures that housed as many as 13 on any given night.

Standing nearby, Abu Malhous’s friends and family said the man was not connected to the militant group, nor was his brother, who was seriously injured. Abu Malhous was a retired Palestinian Authority employee, he said.

“My father has nothing to do with any political organization, and my uncle is an agricultural worker,” said Abu Malhous’s son Mohammed Rasmi Sawarkh, 19.

Sawarkh said he was sleeping in a house nearby when an explosion rocked the area. He rushed over to find his father and one of his father’s two wives and several others dead. Children ranging in age from 13 to a toddler were also killed. Other family members in nearby houses were injured, he said.

“There is no justification for the Israeli bombing,” Sawarkh said. “I don’t know how they can kill two entire families, all children and women.”

Balousha reported from Deir al-Balah.