Israeli soldiers sit on a tank close to the Israeli border with the Gaza Strip on Oct. 30, near where forces blew up a tunnel stretching from Gaza Strip into Israel. (Menahem Kahana/AFP/Getty Images)

  Israel's military said Monday that it destroyed an attack tunnel that led into its territory from the Gaza Strip, killing at least seven Palestinian militants, including a senior commander of the Islamic Jihad group and two members of Hamas. 

The tunnel crossed from the area of Khan Younis in Gaza and was still under construction, according to Lt. Col. Jonathan Conricus, a spokesman for the Israeli military. 

Islamic Jihad, the second-largest armed faction in Gaza after Hamas, said five of its members were killed, including the commander of its military wing in central Gaza. The group described the destruction of the tunnel as a "dangerous escalation" and said it reserved the right to respond to the "terrorist aggression."  

Hamas said two of its militants were killed during a rescue mission after the tunnel was targeted. 

Israel has been working on new technology to detect and destroy tunnels since its 2014 war with Hamas, when the group used underground warrens to launch attacks and defend themselves from airstrikes. A total of 67 Israeli soldiers and six Israeli civilians were killed in the conflict, while 2,251 Palestinians died, according to the United Nations.

Israel also is constructing an underground barrier to prevent tunnels from crossing into Israel. The Palestinian enclave is already fenced off above ground. 

"I told you many times before that we are developing breakthrough technology to deal with the tunnel threat," Israeli Prime Minister Benjamin Netanyahu told local media on Friday. "We are implementing it. Today, we located a tunnel, and we destroyed it."

Conricus declined to give further information on the "new technology" but said it was used for the first time in detecting a tunnel. The tunnel ended just over a mile from the Israeli village of Kissufum, which he said was the assumed target.

"We have no interest in an escalation," he said, but he added that Hamas, which has controlled Gaza since 2007, would be held responsible for any aggressive action from the area. 

Hamas, which is in the process of reconciling with its rival Palestinian faction, Fatah, accused Israel of attempting to sow discord and "ruin efforts to restore Palestinian unity."