Israel allowed Hamas to collect the bodies of two of its gunmen from the tunnel in which they were killed during a clash with IDF soldiers overnight Thursday-Friday in which five soldiers were injured and a total of four Hamas men were killed.

According to reports in the Arabic-language press cited by Channel 2 News, Israel — working through an Egyptian mediator — coordinated with Palestinian sources to have the bodies of two Hamas men recovered.

Israel did not confirm the report, according to Channel 2.

Overnight Thursday-Friday, one soldier was seriously wounded and another was in moderate condition after an IDF operation to destroy part of a tunnel, east of Khan Younis just inside the Gaza Strip, was targeted by Hamas using an explosive device.

Injured Israeli soldiers are taken into Soroka hospital in Beersheba on October 31, 2013. The IDF said five soldiers when an explosive device went off as troops were clearing a tunnel dug by Hamas from the Gaza Strip into Israel (Photo credit: Dudu Greenspan/Flash90)

Injured Israeli soldiers are taken into Soroka hospital in Beersheba on October 31, 2013. The IDF said five soldiers when an explosive device went off as troops were clearing a tunnel dug by Hamas from the Gaza Strip into Israel (Photo credit: Dudu Greenspan/Flash90)

Four members of Hamas’s armed wing, Izz ad-Din al-Qassam, were killed in the clash, including three of the Islamist group’s tunnel and rocket experts, an Israeli military source said.

The IDF had braced for the possibility of soldiers being targeted in the operation to destroy the tunnel, including possible kidnap attempts, the military source said. The explosive device, planted by Hamas in the weeks since the tunnel was first detected and revealed by the IDF, may have been detonated by a drill used by one of the IDF troops in the operation, the source added.

Senior members of the IDF’s Combat Engineering corps were involved in the operation, and were among those injured.

The Israeli Air Force later targeted another tunnel in the southern Gaza Strip, confirming a direct hit.

Hamas-run TV in Gaza said that its forces laid out a “sophisticated” improvised explosive device (IED) for the soldiers, adding that this was a “slap in the face to those who claim the resistance is dead.” A Hamas spokesman threatened that the Strip would be “a graveyard for the invaders.”

The IDF’s Southern Command chief, Maj. Gen. Sami Turgeman, said the tunnel dug under the border was a terrorist initiative, and that Israel crossed a short distance into Gaza to eliminate the threat it posed. “Quiet will be met with quiet,” he said, but if Hamas continued instigating terrorism, it would be met with a forceful IDF response.

The soldiers were blowing up a segment of the major tunnel that was exposed in October, the IDF said. They were within 100 meters of the Kissufim checkpoint between Israel and the Strip, on the Gazan side.

The tunnel — 18 meters underground, 1.7 km long and particularly wide, according to officials — started in Abbasan al-Saghira, a farming village near Khan Younis, and terminated inside Israel, about three kilometers from Kibbutz Ein Hashlosha, in the western Negev.

“In its offensive actions against Israel, Hamas has breached the arrangements reached following Operation Pillar of Defense,” the IDF said in a statement Friday.

Palestinians gather around the body of a Hamas terrorist at a hospital in Khan Younis in the southern Gaza Strip October 31, 2013.  (Photo credit: Abed Rahim Khatib/Flash 90

Palestinians gather around the body of a Hamas terrorist at a hospital in Khan Younis in the southern Gaza Strip October 31, 2013. (Photo credit: Abed Rahim Khatib/Flash 90

The tunnel was likely intended to facilitate a terror attack or kidnapping attempts inside Israel.

The mission to destroy the tunnel “was imperative due to the potential to utilize the terror tunnel for future attacks against Israeli civilians,” IDF Spokesman Lt. Col. Peter Lerner said. “This tunnel, similar to the one used to kill two IDF soldiers and kidnap Gilad Shalit in 2006, was built for this heinous purpose. Hamas, as the authority in the Gaza Strip, is accountable and responsible for all activities aimed at harming Israeli civilians and IDF soldiers.”

Earlier Thursday, residents of Israeli communities along the Gaza border bade a reluctant farewell to IDF troops who were pulled out of guard duty there.

Soldiers will no longer man guard posts in 13 communities that abut the border, with security duties henceforth to fall on the residents themselves. Local residents said that the constant presence of soldiers had been reassuring with the Gaza Strip so close to their homes.

Community leaders had requested an urgent meeting with Defense Minister Moshe Ya’alon, but were yet to receive a response as of Thursday, Yedioth Ahronoth reported.

Alon Schuster, head of the Sha’ar Hanegev Regional Council, reacted to the IDF withdrawal, saying its timing was “most unfortunate” in light of Thursday night’s events in Gaza. “The facts speak for themselves,” he added.

On Wednesday, dozens of local residents held a demonstration in the Netiv Ha’asarah community against the pullout, on which the IDF’s Operations Directorate decided in September.

Communities near the border with Gaza have sustained frequent rocket and mortar attacks over the past decade. Those attacks have diminished significantly since Israel’s Operation Pillar of Defense, an 8-day military offensive that sought to curb rocket fire from the Strip last November.