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.
- Tornado relief spurs LDS Church, Layton's...
- Fire chief says search almost complete in...
- Photo gallery: Tornado rips Oklahoma suburb
- Teachers saved many lives during Oklahoma...
- Salt Lake City has highest rate of same-sex...
- Former IRS chief to Congress: Can't say how...
- Authorities: Man questioned in Boston bombing...
- 'We will rebuild': Tornado toll at 24;...
- Mitt Romney talks IRS, AP records,... 65
- Journalists criticize Obama... 38
- Associated Press CEO calls records... 23
- White House insists Obama was not... 22
- Former IRS chief to Congress: Can't say... 20
- More Obama aides knew IRS targeted... 19
- Supreme Court to weigh in on... 17
- Fire chief says search almost complete... 15