Four Gaza militants were killed overnight in a firefight with Israeli troops sent to destroy Hamas tunnels, officials on both sides said on Friday.
The local commanders of Hamas's military wing were killed by tank fire, Palestinian officials said, while the Israeli army said five of its soldiers were wounded by an explosive device.
Palestinian officials said Rabieh Barikeh was killed instantly in the firefight late Thursday night and Khaled Abu Bakr died of his wounds during the night.
The bodies of Mohammed al-Qassas and Mohammed Daoud were discovered later. They said all were local commanders of Hamas's Ezzedine al-Qassam military wing.
The Israeli military said the fighting erupted when an explosive device went off as troops were clearing a tunnel from the Gaza Strip into Israel, allegedly to be used as a springboard for militant attacks.
During the operation, Hamas targeted the Israeli soldiers with an explosive device, wounding five of them, it said in a statement.
In response, "the soldiers opened fire and directly hit a terrorist" and Israeli warplanes struck "an additional terror tunnel located in the southern Gaza Strip," it said.
No Palestinian casualties were reported in that strike.
During the exchange, Hamas TV said, three mortar shells were fired from Gaza into southern Israel.
The Israeli army reported only one, which it said fell in an open field, causing no injury or damage.
The military said the initial target was a section of tunnel into Israel uncovered last month.
"This mission was imperative due to the potential to utilise the terror tunnel for future attacks against Israeli civilians," the statement quoted spokesman Peter Lerner as saying.
Ezzedine al-Qassam said on October 20 that it dug the tunnel as part of a plan to kidnap Israeli soldiers and hold them in exchange for Palestinians held in Israeli prisons.
"We are working on the ground and under the ground to release the prisoners" held by Israel, the group's spokesman Abu Obeida said at the time.
In June 2006 a group of Hamas and other militants sneaked into Israel through a cross-border tunnel, seized Israeli soldier Gilad Shalit and took their prisoner back to Gaza the same way.
He was released on October 18, 2011 in exchange for 1,027 Palestinians held in Israeli prisons.
The trade was feted by Hamas as "an historic victory".