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.
- Wyoming ranked third in US in percentage of...
- Hometown pastor says community stands by...
- Sen. Harry Reid's retirement recalls his...
- 'Llama drama' owners say USDA draws line...
- 'A marvellous work and a wonder': A look back...
- Hundreds rally against Indiana law, say it's...
- Move over 'Phantom,' Coldplay getting air...
- Deliberate crash of German plane highlights...
- 'A marvellous work and a wonder': A... 63
- 'Maternal feminists' defend motherhood... 54
- Rep. Trey Gowdy: Hillary Clinton wiped... 48
- Sen. Harry Reid's retirement recalls... 36
- Senate's Harry Reid announces he won't... 34
- Alone at controls, Germanwings co-pilot... 27
- Preparing for 2016 campaign, Hillary... 17
- Military: Bowe Bergdahl may face life... 17