Uzi Dayan, a former general and national security adviser, said Israeli intelligence has been tracking Hamas individuals and locations for years, waiting patiently for the opportune moment to attack.
"When you discover a place, you don't strike it immediately. You track it, observe it and wait," he said. "Over time, these targets add up."
Another tool is recruiting informers. The task has become harder since Israeli forces withdrew from the Gaza Strip in 2005 and lost the immediate interaction with its assets. But the Shin Bet is still prolific in recruiting Palestinians imprisoned in Israel or those who travel to Israel for medical procedures.
Palestinians claim the Shin Bet often blackmails Palestinians into cooperating by threatening to expose details that would shame them or even get them killed at home.
Hamas' military wing killed two Palestinians this week for allegedly providing Israel with sensitive information. One man was shot twice in the head. Another body was found tossed into a garbage bin with a gunshot wound to the head.
Defense Minister Ehud Barak said thanks to its intelligence Israel immediately destroyed most of the long-range missile threat against it. Still, Israel has been hit by more than 400 rockets in four days of fighting, including attacks against the Tel Aviv heartland and Jerusalem, some 80 kilometers (50 miles) away.
In several attacks, Hamas said it had unleashed for the first time the most powerful weapons in their arsenal — Iranian-made Fajr-5 rockets.
Israel's inability to halt the rocket attacks, after days of intense aerial bombardments, reflects its limitations. Just as Israel has raced to improve its military tactics, Hamas and other armed groups in Gaza have built up their arsenals with large numbers of powerful weapons.
Once limited to crude projectiles manufactured in Gaza, Hamas has used smuggling tunnels along the border with Egypt to bring in sophisticated, longer-range rockets from Iran and Libya, which has been flush with weapons since Moammar Gadhafi was ousted last year.
Israel appeared stunned by the attack on Jerusalem, though a day later officials insisted they were aware of the weapon. Hamas said the M-75 missile was made in Gaza, with Iranian assistance.
Hamas officials rejected the Israeli intelligence bravado as propaganda, calling it psychological warfare.
The militants have also done a better job of evading the Israeli military by refraining from using mobile phones or two-way radios and moving frequently from one underground location to another.
In turn, Israel's "Iron Dome" rocket-defense system has provided the country a defensive boost. The military says the system has intercepted nearly 250 rockets, including one heading toward Tel Aviv on Saturday.
The only Israeli deaths in the fighting so far were three civilians who officials said had ignored well publicized security precautions.
- Zuckerberg and wife, in letter to new...
- Jeb Bush used 'shock and awe' campaign to...
- L.A. deputy talks about rescuing newborn who...
- World leaders gather to try to save Earth...
- College Football: Utah moves back into top...
- Obama says parts of climate deal must be...
- Everything you need to know about year-end...
- Trump says he should charge CNN for next...
- College Football: Utah moves back into... 71
- Jeb Bush used 'shock and awe' campaign... 51
- 'No more baby parts': Reclusive... 50
- World leaders gather to try to save... 36
- Police: 3 killed, 9 wounded in attack... 35
- Obama: Climate pact an 'act of... 33
- Official says gunman made 'no more baby... 29
- Obama says parts of climate deal must... 21