About two weeks before Israel started its Operation Protective Edge, the entire political leadership of Hamas in Gaza attended a funeral for five members of the movement's military wing — among the attendees were former premier Ismail Haniyeh, Speaker of the Gaza parliament Ahmad Bahar and other senior figures from Hamas' politburo.

On its face, this might seem like a rare occasion, but an explanation might be found in the identities of the deceased — all were members of the so-called tunnel digging unit of the Hamas' military wing.

Little is known about this unit but among Gazans, and especially Hamas supporters, it has taken on legendary status.

It was several years ago when Hamas began to realize they could not confront the Israeli army on the ground, so decided to develop a network of tunnels believing it could give them the advantage they needed.

Hamas did not invent this model — the inspiration and expertise were imported from Hezbollah, who developed a web of tunnels in southern Lebanon in the 1990s in a bid to deal with the Israeli army's airspace dominance. Since then, things have taken a different course and the relations between Hamas and Hezbollah have soured due to the war in Syria.

Hamas has kept information about the tunnel unit's activities strictly secret. But it is known the unit is comprised of several hundred members of the military wing who were carefully chosen and given lengthy training.

The work is high risk and dozens of them have lost their lives over the past few years. On multiple occasions Hamas has even reported it lost men in attempts to rescue bodies.

This Sisyphean work underground can last for weeks. The assault tunnels are today considerably more advanced than before, but while light machinery is used, part of the digging is still done manually.

These tunnels are lined with cement smuggled from Egypt's Sinai peninsula. They are also equipped with electricity and communications infrastructure and, perhaps most importantly, they are wide enough for people to walk through, not only crawling as in the past, thus enabling weapons to be carried through.

According to estimates in Gaza, in just one day a trained Hamas team can dig up to 20 meters. One meter of digging and building costs at least $200 and, unsurprisingly, Fatah figures have criticized Hamas for using the hundreds of millions of dollars of aid funds, intended for the welfare of Gazans, for financing the digging operations instead of repairing crumbling infrastructure. 

Path to employment

According to Arab media reports, the tunnels have become the leading way to export goods for Hamas' military wing. Rebels on the Syria-Lebanon border have also started using the tunnel method, and a senior figure among the rebels in Aleppo even said in a recent interview they have gained knowledge of tunnel digging from Hamas members in Gaza. Ironically, the main force leading the efforts to uncover these tunnels is Hezbollah.

The Israeli army has been trying to uncover these tunnels since their ground offensive began. But not all tunnels in Gaza are intended for warfare. Others, under the border with Egypt, have been playing a key role in Gaza's economy, operating under Hamas regulation, with the illicit trade generating considerable income for senior Hamas officials and affiliates.

Economically, these subterranean conduits have not only enabled the supply of goods, but also made for an important employment source for Gaza's youth, as well as an investment opportunity for anyone seeking quick profits.

In the Rafah area, two kinds of tunnels are in operation — one for goods and one for human travel, offering a bypass of the Rafah border crossing that had been shut by Egypt.

With this expansion in activity, the tunnels have further professionalized — there were specific tunnels for petrol and gas, tunnels for light goods like foodstuff, and tunnels for heavy goods where even cars passed.

With close to 1,200 tunnels in 2013, this underground system has helped Hamas to increase its economic standing and establish the power of its military wing, the Al Qassam Brigades, that never really suffered a shortage of money, even when most of Gaza's population was struggling with the hardships of Israel's siege.

Nevertheless, most of the tunnels have been destroyed by the Egyptian army, which suspected they were used for smuggling arms and terrorists into Sinai.

Though, ultimately, with or without the tunnels, it appears that the economic situation of Hamas' military wing is largely immune to external factors, including the economic crisis hitting Gaza. Today Hamas receives most of its donations from Qatar, totaling nearly $100 million annually.

Earlier this year Hamas announced it was unable to pay any public sector salaries. However, Gazan political analyst Hani Habib argued that the crisis still would not paralyze the military wing.

"Hamas has economic logic, these are professional traders," he said in an interview last week. "Hamas doesn't suffer a permanent shortage. Sometimes its income drops and sometimes it takes more effort to get it, but this ability doesn't disappear."

Gaza-based Professor Adnan Abu Amer estimates that from Hamas' perspective, a success in assaults would enhance its popularity among various elements in the region, and might even lead to rapprochement with Iran, which used to channel about $250 million a year to Hamas' coffers. Iran-Hamas ties were severed in 2011 when the fighting in Syria stopped the regular flow of money.

*Doron Peskin is the director of the research department at Info-Prod Research (Middle East).