The Israeli government had determined that the loosely organized civilian guard, known as Kitat Konnenut, would serve as the first line of defense in the towns and villages near the border. But the guardsmen had different standards of training depending on who was in charge. For years, they warned that some of their units were poorly trained and underequipped, according to two Israeli military officials with direct knowledge of the volunteer teams.

Additionally, the Israeli military reservists were not prepared to quickly mobilize and deploy. Some described heading south on their own initiative.

Davidi Ben Zion, 38, a major in the reserves, said reservists never trained to respond at a moment’s notice to an invasion. The training assumed that Israeli intelligence would learn of a looming invasion in advance, giving reservists time to prepare to deploy.

“The procedure states that we have the battalion ready for combat in 24 hours,” he said. “There’s a checklist to authorize the distribution of everything. We practiced this for many years.”

Hamas capitalized on these errors in ways that further delayed the Israeli response. Terrorists blocked key highway intersections, leaving soldiers bogged down in firefights as they tried to enter besieged towns. And the Hamas siege on the military base in southern Israel crippled the regional command post, paralyzing the military response.

Much remains unknown about that day, including what orders were given inside Israel’s senior military leadership in Tel Aviv, and when. The Times investigation builds on and adds new details to aggressive coverage in the Israeli media of the military response.

Officers and reservists who headed south that morning, whether under orders or on their own, soon learned of the chaos that they were entering.

Gen. Barak Hiram, who was scheduled to soon take over command of a division along the Gaza border, drove south to see firsthand how the soldiers there responded to what seemed like a routine Hamas attack.

In an interview, he recalled the text messages he received from soldiers he knew in the region.

“Come save us.”

“Send the army, quickly, they are killing us.”

“Sorry we’re turning to you, we’re already out of weapons.”

Commando units were among the first to mobilize that morning. Some said they rushed into the fight after receiving messages pleading for help or learning about the infiltrations from social media.

Other units were on standby and received formal activation orders.

The small size of the teams suggested that commanders fundamentally misunderstood the threat. Troops rolled out with pistols and assault rifles, enough to face a band of hostage-taking terrorists, but not to go into full-scale battle.

Previously undisclosed documents reviewed by The Times show just how drastically the military misread the situation. Records from early in the day show that, even during the attack, the military still assessed that Hamas, at best, would be able to breach Israel’s border fence in just a few places. A separate intelligence document, prepared weeks later, shows that Hamas teams actually breached the fence in more than 30 locations and quickly moved deep into southern Israel.

Hamas fighters poured into Israel with heavy machine guns, rocket-propelled grenade launchers, land mines and more. They were prepared to fight for days. Israeli commandos apparently believed they would be fighting for just hours; one said he set out that morning without his night-vision goggles.

“The terrorists had a distinct tactical advantage in firepower,” said Yair Ansbacher, 40, a reservist in a counterterrorism unit who fought on Oct. 7. He and his colleagues mainly used pistols, assault rifles and sometimes sniper rifles, he said.

The situation was so dire that at 9 a.m., the head of Shin Bet, Israel’s domestic security agency, issued a rare order. He told all combat-trained, weapons-carrying employees to go south. Shin Bet does not normally activate with the military. Ten Shin Bet operatives were killed that day.

Making matters worse, the military has acknowledged that it moved two commando companies — more than 100 soldiers — to the West Bank just two days before the attack, a reflection of Israel’s mistaken belief that a Hamas attack was not an imminent threat.

That left three infantry battalions and one tank battalion along Gaza’s border. But Oct. 7 was the Jewish holiday of Simchat Torah, and the Sabbath. One senior military officer estimated that about half the 1,500 soldiers in the area were away. He said that another infantry battalion had been reassigned years earlier after Israel finished building a security wall around Gaza.

Whether Hamas knew that the military was understaffed is unclear, but it had fatal consequences. When the attacks began, many soldiers were fighting for their lives instead of protecting residents nearby. Hamas stormed one base, Nahal Oz, forcing soldiers to abandon it and leave behind dead friends.

And just as the civilian volunteers had warned, the first line of defense inside Israel was quickly overwhelmed. Some units barely had enough weapons for an hourslong battle, officials said.

Hamas also worked strategically to weaken Israel’s advantage in firepower. Terrorists targeted Israeli tanks, hitting several of them, said Brig. Gen. Hisham Ibrahim, the commander of the armored corps. Tanks ran out of ammunition, leaving crews to fight with ground soldiers.

In another instance widely covered in the Israeli media, Hamas fired on an Israeli helicopter, forcing it down near Gaza. The paratroopers escaped injury before the helicopter burst into flames.

All of this should have been a clear sign that Israel was under broad attack, facing a dire situation.

But Hamas made another strategic strike that morning that all but blinded Israel’s military at a critical moment.