Five Palestinians, including a mother and her three sons, were killed after daybreak Friday in an explosion in a house in Shajaiyeh, hospital officials said.
The army said it fired at two gunmen who were on a balcony because they were preparing to launch an anti-tank weapon at the forces. Israel Radio reported that one of the men was a Hamas operative.
Palestinians operated from within populated areas, the IDF said, when the troops are threatened, it is the IDF's responsibility to defend itself.
The house belonged to Hamas activist Mohammed Harara, who was killed, said relatives who saw the bodies at Gaza's Shifa Hospital. They identified three of the others as a mother and her two pre-teen sons, relatives of Harara. The fifth body was badly burned and was not immediately identified.
The house is across from the Karni cargo crossing between Israel and Gaza, where the has been massing during a three-week offensive in Gaza.
Palestinian security officials reported IDF tank movements across from the Shajaiyeh neighborhood, where the explosion occurred. They said the IDF forces were in a buffer zone inside Gaza.
The IDF said there was routine activity in the area of the Karni crossing to search for tunnels and weapons.
Earlier, IDF forces pulled out of a refugee camp in central Gaza and the IDF confirmed that a two-day sweep had been completed.
In two days of battles in the Mughazi camp, troops killed at least 14 people, most of them gunmen. Residents said they left behind considerable destruction, tearing up water pipes and electricity wires.
An IDF spokesperson said although the Army was moving out of the camp, IDF soldiers would continue operating there and in other places in the coming days in its campaign against Palestinian operstives in the Gaza Strip.
On Thursday, promoting a new policy, the IAF dropped leaflets on towns and villages in the Gaza Strip warning residents that anyone who hides weapons in their home, for militants, could face attack.
The Arabic-language leaflets, which warned of "dangerous consequences" for anyone with an arsenal of weapons, were distributed as Israel pressed ahead with a three-week-old offensive in the Strip, aimed at recovering 19-year-old Cpl. Gilad Shalit and halting Palestinian rocket fire across the border.
The move came as violence continued for the second straight day in a refugee camp in central Gaza, where Israeli forces killed three Palestinians, including at least two militants, one of whom was preparing to launch an antitank rocket at Israeli troops, during an army offensive in the camp.
A 10-year-old Palestinian girl who was wounded in an air strike on the camp on Wednesday also died Thursday, the Associated Press reported.
The military operation in the Mughazi refugee camp, located about one kilometer from the Israeli-Gaza border near the Palestinian town of Deir al-Balah, was the latest in a series of military operations against wanted militants in Gaza.
"Anyone who has, or is keeping an arsenal, ammunitions or weapons in their house must destroy it or they will face dangerous consequences." "The IDF will strike and destroy every position or building where there are militants, ammunition and military equipment," the leaflet read.
Until now, Israeli forces have primarily attacked empty Palestinian government buildings and open areas that terrorists used to fire rockets at Israel. In the latest strike, the IAF fired missiles early Thursday at an abandoned police station.
Israel began its military incursions into Gaza three weeks ago after a daring cross-border raid by Hamas, in which two Israeli soldiers were killed and Shalit was abducted.
More than 100 Palestinians - the vast majority of them gunmen - have been killed in Gaza since the army began its incursions to flush out militants and to stop rocket attacks against Israel.
Despite the army raids, terrorists have fired 182 Kassam rockets into Israel since the offensive began, including at least five rockets launched on Thursday, according to the UN.
Earlier this week, in an escalation of violence, police sappers discovered that Palestinian terrorists had also fired a more sophisticated rocket at Israel. The 'Grad' rocket, which landed harmlessly in the Negev, has an increased range and carries a larger warhead than the nearly 1,000 Kassams which Palestinians have been launched at Israel over the year since Israel pulled out of the Gaza Strip.
Israel has fired 1,000 artillery shells into Gaza, while the Israeli air force conducted 168 bombings in Gaza since the operation got underway on June 28, the UN said.
Meanwhile, in the West Bank city of Nablus, a tense standoff between troops and militants continued for a second day Thursday, with soldiers surrounding a security compound where a group of Palestinian militants were holed up.
About 4,000 Palestinians demonstrated in Nablus in support of Hizbullah, calling on the terror group's leader, Hassan Nasrallah, to attack Israel with rockets.
"Nasrallah, our dearest, strike, strike Tel Aviv," the Palestinians shouted.