Israel and Gaza's Hamas rulers scrambled Wednesday to contain fallout from the worst fighting since a truce was declared five months ago, but a flare-up later in the day threatened to unravel it anew.

Gaza militants pounded southern Israel early Wednesday with dozens of rockets to avenge raids a day earlier that killed six militants, but the guns quickly fell silent with neither side appearing to have much to gain from renewed hostilities.

Click here for photos. (Warning: Graphic Content.)

"We have no intention of violating the quiet," Israeli Defense Minister Ehud Barak said on a tour of areas bordering Gaza. "But in any place where we need to thwart an action against Israeli soldiers and civilians, we will act."

Hamas spokesman Fawzi Barhoum said the group fired deep into Israel to demonstrate the price of continued aggression. At the same time, he said, Hamas had contacted Egyptian mediators to find ways of keeping the truce intact.

But late Wednesday night, Israel launched annother airstrike, killing a Palestinian militant in northern Gaza. The army said it was targeting a rocket launcher, whom the Islamic Jihad group identified as its own. The group had fired two rockets at the Israeli border town of Sderot and one of its leaders, Khader Habib, declared the truce over.

Hamas, which agreed to the Egyptian-mediated truce, said Israel was breaching it.

Before the Egyptian-mediated truce in June, near daily rocket barrages played havoc with southern border towns and Israel has not found a military solution to stop them. Retaliatory Israeli airstrikes killed scores of Palestinians in Gaza.

Hamas, on the other hand, needs the calm to strengthen its hold on Gaza, where it seized control in June 2007, and restore its military capabilities ahead of a potential future battle with Israel.

Clashes began late Tuesday after the Israeli army burst into Gaza to destroy what it said was a tunnel being dug near the border to abduct Israeli troops. During the incursion, Hamas gunmen battled Israeli forces. One Hamas fighter was killed, prompting a wave of mortar fire at nearby Israeli targets.

An Israeli airstrike then killed five Hamas militants preparing to fire mortar shells. Hamas responded with the barrage of rockets, including one that landed in an empty area in the city of Ashkelon, some 10 miles north of Gaza.

There were no reports of injuries or property damage. The army said four soldiers were wounded, two moderately, in the fighting.

Thousands of Palestinian mourners rushed slain militants through the streets of the southern Gaza town of Khan Younis, waving green Hamas flags and vowing revenge.

Israeli defense officials said they had discovered a 300-yard long tunnel days ago, and concluded the passage was to be used for a kidnapping. Hamas already is holding an Israeli soldier that militants captured in a cross-border raid more than two years ago.

Defense officials said they knew the raid could jeopardize the cease-fire, but concluded Hamas would have an interest in restoring the calm.

Sporadic rocket attacks on southern Israel have persisted since the truce, but the attacks were carried out by smaller groups seeking to embarrass Hamas for preserving a truce with the Jewish state.

Continued attacks have prompted Israel to close its crossings into the coastal strip of 1.4 million Palestinians. Israel and Egypt lead a blockade on the Gaza Strip, imposed since Hamas seized power of the territory a year ago.