Palestinian militants in the Gaza Strip on Wednesday fired a number of mortar shells and at least three Qassam rockets at the western Negev, hours after Israel Defense Forces soldiers killed four Hamas gunmen near the Gaza border.

Neither the shells nor the rockets caused any damage or injuries.

Earlier Wednesday, soldiers opened fire on a group of Palestinian gunmen they saw approaching the security fence. The militants were trying to lay an explosive device near the fence, the army said.

The incident began when soldiers from the IDF Paratroopers Brigade saw the group of Palestinians moving toward the border fence near the central Gaza town of Khan Yunis. The troops subsequently opened fire on the militants.

Dring an ensuing gunbattle, a number of mortar shells were fired at the IDF troops and an explosive device was detonated, according to the army.

One IDF soldier sustained a light wound to his hand, and was taken for treatment to the Soroka Medical Center in Be'er Sheva.

Palestinian Health Ministry official Dr. Moawiya Hassanain said ambulances later retrieved the bodies of four Hamas militants from the area of fighting. They were identified as Mahmoud Siam, Rami Farina, Mohsen al-Kudra and Ismail Abu al-Allah.

The IDF said various weapons and grenades were found on their bodies.

Hamas' military wing threatened retaliation.

"The anger of our people and our resistance will reach everybody, God willing, and our response to the enemy will be painful, and will spill the Zionists' blood," the wing's spokesman, Abu Obeida, said in a statement.

By the early afternoon, it was still unclear whether the militants were attempting to infiltrate Israel or were trying to attack soldiers near the border.

The army relayed that following the incident, the Israel Air Force aircraft fired at mortar gunners.

Gaza's Hamas rulers stopped short of saying a fragile 5-moth old cease-fire between Israel and Hamas was over but said militants would fight any entry of IDF troops into the coastal territory.

"This is a clear violation of the truce, and the resistance has the right to respond to any attack," said Fawzi Barhoum, a Hamas spokesman.

The truce began to unravel last Tuesday, after IDF troops trying to destroy a militants' tunnel entered Gaza, setting off battles that killed seven Palestinian gunmen.

The fighting sparked a wave of rocket attacks from Gaza at Israeli border towns.

The IDF said some 80 rockets and mortars have been fired at southern Israel from Gaza since the barrages resumed last week and security officials have warned that truce might not last.

"We are looking at the relative calm around us and know that under the surface other things are brewing," said Defense Minister Ehud Barak Tuesday in a visit to the army's Southern Command, in charge of Gaza operations.