GAZA CITY, Gaza Strip - Israeli troops clashed with Hamas militants inside the Gaza Strip on Thursday, killing eight in fierce fighting that drew in Israeli aircraft, tanks and bulldozers.

It was the second-deadliest day of fighting between the two sides since the Islamic militant group wrested control of Gaza in mid-June. In all, more than 30 Palestinians -- nearly all of them militants but including a 12-year-old boy -- have been killed in at least five separate Israeli military operations in Gaza since the Hamas takeover.

Troops had ventured about a half-mile inside central Gaza on a routine foray against rocket squads when airmen backing their patrol identified a group of approaching militants, the army said.

The airmen opened fire on the Hamas fighters, sparking a shootout on the ground between the militants and the patrol, the army said.

Hamas spokesman Abu Obeida said its fighters started the battle by opening fire on an Israeli undercover unit.

Witnesses reported a heavy exchange of fire as Israeli tanks and bulldozers moved in, and soldiers took positions on rooftops. Hamas and Islamic Jihad militants hit back with small arms and mortars aimed at the Erez passenger crossing between Israel and Gaza. They also laid mines targeting the soldiers.

Two of the mortar shells landed on the Israeli side of the passage, which has been closed to most traffic since Hamas wrested control of Gaza last month, the army said. No one was injured, but the shells set off a fire in a road at the crossing, the army said.

Hospital officials said six militants were killed in the fighting, and Hamas said all belonged to its group. Among the dead was the Hamas field commander in central Gaza, Hamas TV said.

Israeli aircraft later dropped missiles at militant targets in the area, the army said. Hospital officials said two militants were killed in one of the airstrikes. Hamas said both were members of the group.

The fighting took place close to the Bureij refugee camp in the central Gaza Strip, a site of frequent clashes between gunmen and the Israeli army. Israeli troops arrested 18 militants, who were led away with their eyes blindfolded, the army said.

Deposed Palestinian Prime Minister Ismail Haniyeh of Hamas, and a spokesman for Fatah, Hamas' bitter rival, both condemned the Israeli operation and urged Palestinians to fight back.

"We assert that our people have the full right to defend themselves and to confront these aggressions," Haniyeh said.

Elsewhere, along Gaza's northern border with Israel, Hamas officials said some 15 tanks and three bulldozers had moved into Palestinian farms and were leveling the land. The army said it had no such vehicles in the area.

Meanwhile in Gaza City, some 400 Fatah civil servants were prevented from entering their offices as part of the power struggle between the moderate Fatah government in the West Bank and the Hamas rulers of Gaza. The territories have been functioning as separate entities since Hamas seized Gaza by force last month.

The Hamas-dictated work week in Gaza runs from Saturday to Wednesday, with Thursday and Friday assigned as the weekend. Salam Fayyad, the new Palestinian prime minister in the West Bank, recently announced the work week would run from Sunday through Thursday, as it does in Israel.

On Thursday, Hamas forces barred people from entering government offices, saying they were closed because it was the official weekend. Most Palestinian civil servants are loyal to Fatah.

"We told them that the government in Ramallah announced new weekend days but they said the people in Ramallah are not the government," said Imad, 40, an employee at the Public Works Ministry who refused to give his last name for fear of Hamas retribution.

"We are not coming on Saturday because its the official weekend. This is the beginning of the battle against the coup government in Gaza," he said.

Abu Dajana, a Hamas security officer, said the orders of the "legitimate government" in Gaza would be implemented.

On Wednesday, Gaza government employees loyal to President Mahmoud Abbas of Fatah collected their first full salaries in 15 months. Civil servants who sided with Hamas' bloody takeover of Gaza were not paid.