The Israel Defense Forces foiled a large scale terror attack planned to coincide with a barrage of some 50 Qassam rockets and mortar shells fired from Gaza into western Negev Thursday afternoon, the army said.

One Israeli woman moderately wounded when a rocket slammed directly into the infirmary in a moshav in the Ashkelon coastal region.

The IDF said that Gaza militants were planning to use the heavy barrage as a diversion in order to carry out a massive attack at the border fence between Israel and the Strip.

A heavy vehicle approached IDF troops stationed at the Gaza border fence at an alarming speed, the IDF described the attempted attack. The soldiers opened fire and forced the vehicle to stop. The IDF said that it was the soldiers' quick response that likely prevented a serious attack.

The vehicle and the scene were both studied by IDF investigators in order to learn more details of the militants' plan.

Furthermore, the IDF added that the Israel Air Force bombed the Palestinian mortar squad that fired on kibbutz Nir Oz minutes earlier, and identified a direct hit.

The barrage of mortar shells came shortly after an explosion destroyed a Hamas bomb-maker's house in the Gaza Strip, killing at least seven people, including a baby, in what Hamas initially called an Israeli air strike.

Israel, which routinely accepts responsibility for attacks on military targets, denied involvement and described the incident as a Palestinian work accident.

The explosion, which also wounded about 25 people, destroyed the two-story dwelling and damaged several other homes in the northern Gaza town of Beit Lahiya, an area from which militants frequently fire rockets into southern Israel.

Hamas spokesman Abu Obeida later announced the group had launched an investigation into the cause of the blast, indicating that the explosion was likely caused by an accident.

Hamas initially said that an Israel Air Force aircraft attacked the house belonging to Ahmed Hamouda, whom it described as one of its senior bomb-makers.

It was not clear whether Hamouda, was inside the house at the time of the explosion.

The Hamas-run Interior Ministry said a 4-month-old niece and teenage nephew of Hamouda were among the dead, along with an assistant to Interior Minister Said Siyam, a top Hamas figure in Gaza.

Over the years, dozens of Palestinian militants have been killed unintentionally while mishandling explosives meant to be used against Israel.

Earlier Thursday, Israel Defense Forces troops killed two Palestinian militants who were rigging explosive devices near the security fence between Israel and the Gaza Strip.

An IDF spokesman said the militants were also apparently trying to infiltrate Israeli terrirtory.

An IDF tank operating in the Nativ Ha'asara area north of the Gaza border opened fire on one of the militants and forces from the Givati Brigade shot at the second militant.

The militants killed belonged to the al-Aqsa Martyrs Brigade and the Democratic Front for the Liberation of Palestine, the groups said.

The violence came as members of the political-security cabinet decided to hold off on a much-touted invasion of Gaza in order to give Egyptian-brokered truce efforts more time to succeed.

Meanwhile, Defense Ministry official Amos Gilad headed to Cairo on Thursday in attempt to reignite the Egyptian-brokered truce talks.

IDF troops killed four Palestinians - one militant and three civilians - in three separate incidents in the Gaza Strip on Wednesday.

Also Wednesday, an Israeli man was lightly wounded by a mortar shell fired from the coastal territory.