Hamas’s handbook for underground combat describes, in meticulous detail, how to navigate in darkness, move stealthily beneath Gaza and fire automatic weapons in confined spaces for maximum lethality.

Battlefield commanders were even instructed to time, down to the second, how long it took their fighters to move between various points underground.

The 2019 manual, which was seized by Israeli forces and reviewed by The New York Times, was part of a yearslong effort by Hamas, well before its Oct. 7 attack and current war with Israel, to build an underground military operation that could withstand prolonged attacks and slow down Israeli ground forces inside the darkened tunnels.

Just a year before attacking Israel, Yahya Sinwar, the leader of Hamas in the Gaza Strip, approved spending $225,000 to install blast doors to protect the militia’s tunnel network from airstrikes and ground assaults.

The approval document said that Hamas brigade commanders had reviewed the tunnels below Gaza and identified critical places underground and at the surface that needed fortification.

The records, along with interviews with experts and Israeli commanders, help explain why, nearly a year into the war, Israel has struggled to achieve its objective of dismantling Hamas.