Intelligence shared with the United States suggests a small cell of Hamas operatives planning the deadly surprise attack on Israel communicated via a network of hardwired phones built into the network of tunnels underneath Gaza over a period of two years, according to two sources familiar with the matter.

The phone lines in the tunnels allowed the operatives to communicate with one another in secret and meant they could not be tracked by Israeli intelligence officials, the sources told CNN.

During the two years of planning, the small cell operating in the tunnels used the hardwired phone lines to communicate and plan the operation but stayed dark until it was time to activate and call on hundreds of Hamas fighters to launch the October 7 attack, the sources said.

They avoided using computers or cell phones during the two-year period to evade detection by Israeli or US intelligence, the sources said.

“There wasn’t a lot of discussion and back and forth and coordination outside of the immediate area,” one of the sources said.

The intelligence shared with US officials by Israel reveals how Hamas hid the planning of the operation through old-fashioned counterintelligence measures such as conducting planning meetings in person and staying off digital communications whose signals the Israelis can track in favor of the hardwired phones in the tunnels. It offers new insight into why Israel and the US were caught so flat-footed by the Hamas attack, which saw at least 1,500 fighters pouring across the border into Israel in an operation that killed at least 1,400 Israelis.

CNN has not seen the specific intelligence but spoke to sources familiar with it. The US Office of the Director of National Intelligence declined to comment and the Israeli embassy in Washington did not respond to a request for comment.

CNN previously reported that a series of strategic warnings from US and Israeli intelligence agencies did not lead officials from either country to anticipate the events of October 7.

The Israel Defense Forces colloquially refers to the tunnels built by Hamas over the last fifteen years or so as the “Gaza metro.” The tunnels make up a vast labyrinth that is used to store rockets and ammunition caches, as well as provide a way for militants to move about unnoticed. The IDF also says it contains vital Hamas command and control centers.

Yocheved Lifshitz, an 85-year-old grandmother who was one of two hostages released by Hamas on Monday, said after she was kidnapped, she was taken into the network of tunnels and slept on a mattress on the floor in one of them.

According to the sources briefed on the Hamas assault, the small cell waited until just before the attack was launched to prep a larger group of fighters above ground to carry out the specific operation. One of the sources said that though ground unit commanders and fighters were being trained for many months and kept at a state of general preparedness, they were only informed of the specific plans in the days leading up the operation.

“That’s how you compartment and keep something that’s tight,” the source added, noting that’s what happened in this case.

One of the sources said some of the training above ground was observed but did not ring major alarm bells. The thinking was, “oh they always train people like this. It didn’t look different,” the source said.

A third source familiar with the latest intelligence said Iran has helped Hamas develop their operational security tactics over the years, though US intelligence does not believe Iran played a direct role planning the October 7 attack itself.

Israel was aware that Palestinian militants had been using hardwired communication systems prior to the October attack.

It encountered what appeared to be a similar kind of communication system when the Israeli military raided the city of Jenin in the northern West Bank this summer, according to an Israeli official. When Israeli troops moved in as part of what was dubbed “Operation Home and Garden,” the Israel Defense Forces discovered secure, hardwired communication lines and closed-circuit surveillance cameras to give advance warning of Israeli troop movements.

At the time, the IDF said it had struck a joint operational command center used by militant cells in Jenin, noting that it was used for “advanced observation and reconnaissance.” It was, the IDF said, a “hub for coordination and communication among the terrorists.”